Skip to content

The new docs\Rules\README.md format causes merge issues #2220

Description

@iRon7

(this concerns contribution -documentation- issue)

As far as I can tell, the new docs\Rules\README.md setup (PR2196) will cause a merge conflict with every new rule added to the analyzer repo like: #2186 and #2183.

The new format change:

  • Update rules index (docs/Rules/README.md) to a new “Default state” model and add link references for maintainability
    Which results in a table like:
|                        Rule                        |  Severity   | Default state  | Configurable |
| -------------------------------------------------- | ----------- | :------------: | :----------: |
| [AlignAssignmentStatement][02]                     | Warning     |    Disabled    |     Yes      |
| [AvoidAssignmentToAutomaticVariable][03]           | Warning     | Always enabled |              |
| [AvoidDefaultValueForMandatoryParameter][04]       | Warning     | Always enabled |              |
...

And a reference list like:

<!-- link references -->
[01]: ../using-scriptanalyzer.md#suppressing-rules
[02]: AlignAssignmentStatement.md
[03]: AvoidAssignmentToAutomaticVariable.md
[04]: AvoidDefaultValueForMandatoryParameter.md
[05]: AvoidDefaultValueSwitchParameter.md
...

Might a beter practice for a static README.md, it isn't for a dynamic README.md that needs to be updated with each new rule. The difficulty is because the rule list is alphabetically and inserting a new rule document to the list requires to update all following rules and reference links (that are not related to the new rule PR). Doing so, is in fact rather difficult to maintain and error prone.

A workaround might simply using the next available reference number (e.g. [81]) but that would then appear somewhere in the middle of the list (depending on the rule name) with is quite inconsistent and doesn't add much value to the "maintainability".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions