Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Update Script Analyzer rules #424

Merged
merged 4 commits into from
Aug 30, 2018
Merged

Conversation

johlju
Copy link
Contributor

@johlju johlju commented Jul 30, 2018

  • Update PSSARuleSeverities.md.
  • Add Script Analyzer settings file to DscResource.Template.
  • Update VSCode workspace settings file to use custom Script Analyzer rules.

This change is Reviewable

@johlju johlju added the needs review The pull request needs a code review. label Jul 30, 2018
@johlju
Copy link
Contributor Author

johlju commented Jul 30, 2018

@PlagueHO when you have a chance, could you review this one?

@johlju
Copy link
Contributor Author

johlju commented Aug 27, 2018

@PlagueHO when you have time, can you look at this? See if this is something we should add?

Copy link
Contributor

@PlagueHO PlagueHO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really great stuff @johlju - definitely should add this. I'll add this to all my repos as well.

Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @johlju)


PSSARuleSeverities.md, line 3 at r1 (raw file):

# DSC Resource Kit PSSA Rule Severities

These are the rules that must be used for DSC Resources in DSC Resource Kit.

FYI, I know it is kind of obvious, but maybe it is worth saying These are the PS Script Analyzer rules...


PSSARuleSeverities.md, line 7 at r1 (raw file):

In tests and examples the PS Script Analyzer rules may be suppressed on a case-by-case basis (up to the community and the maintainer).

These rules are also available as a

as a -> as an


DscResource.Template/.vscode/settings.json, line 13 at r1 (raw file):

    "files.trimTrailingWhitespace": true,
    "files.insertFinalNewline": true,
    "powershell.scriptAnalysis.settingsPath": ".vscode\\analyzerrules.psd1"

Shouldn't this be analyzersettings.psd1?

Copy link
Contributor

@PlagueHO PlagueHO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @johlju)


DscResource.Template/.vscode/analyzersettings.psd1, line 4 at r1 (raw file):

    <#
        For the custom rules to work, the DscResource.Tests repo must be
        clone. It is automatically cloned as soon as a unit test is run.

Should be: cloned. It is automatically clone as soon as any unit or integration tests are run.

Copy link
Contributor Author

@johlju johlju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 3 files reviewed, 3 unresolved discussions (waiting on @PlagueHO)


PSSARuleSeverities.md, line 3 at r1 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

FYI, I know it is kind of obvious, but maybe it is worth saying These are the PS Script Analyzer rules...

Don.e I like when text is specific, there are no room for misinterpretation. 🙂


PSSARuleSeverities.md, line 7 at r1 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

as a -> as an

Done.


DscResource.Template/.vscode/analyzersettings.psd1, line 4 at r1 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

Should be: cloned. It is automatically clone as soon as any unit or integration tests are run.

Done.


DscResource.Template/.vscode/settings.json, line 13 at r1 (raw file):

Previously, PlagueHO (Daniel Scott-Raynsford) wrote…

Shouldn't this be analyzersettings.psd1?

Done. Ah, miss changing that when I renamed the files, I just tested it locally but didn't copy in the correct name here. Good catch!

Copy link
Contributor

@PlagueHO PlagueHO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!
:lgtm:

Reviewed 3 of 3 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants