PowerShell / PowerShell/PSScriptAnalyzer

Compiler warning in UseCompatibleCmdlets class due unfinished feature with # if DEBUG pragma -> consider removal to allow us to use the /warnaserror compiler option

Aperta
#913 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@bergmeister ci sta già lavorando.

Dal 28/2/2018.

Area - Build Up-for-Grabs
Lingua principale
C#
Stelle
2.2k
Fork
414
Merge medio
13h 1m
PR unite (30g)
2

Descrizione

UseCompatibleCmdlets produces a compiler warning when being compiled in Release mode:

UseCompatibleCmdlets.cs(38,27): warning CS0649: Field 'UseCompatibleCmdlets.RuleParameters.mode' is never assigned to, and will always have its default value null [C:\projects\psscriptanalyzer\Rules\Rules.csproj]

This seems to be due a 2 year old, unfinished feature that littered lots of #if DEBUG pragmas in this class. The blame does not tell me a referenced issue, therefore I would argue to remove this compile conditional code.
The benefit of this cleanup would also be that we could use the /warnaserror compiler option for a more rigorous test of code changes in CI.
What do you think @JamesWTruher ?

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.