|
872 | 872 | ],
|
873 | 873 | "description": "sequence snippet (for use inside a workflow)"
|
874 | 874 | },
|
875 |
| - "PSSA warning override decoration.1": { |
876 |
| - "prefix": "Suppress - PSSA", |
877 |
| - "description": "Suppress warnings for a specific rule", |
| 875 | + "Suppress PSScriptAnalyzer Rule": { |
| 876 | + "prefix": "suppress-message-rule", |
| 877 | + "description": "Suppress a built-in PSScriptAnalyzer rule using the SuppressMessageAttribute", |
878 | 878 | "body": [
|
879 |
| - "#Suppress warning", |
880 |
| - "[Diagnostics.CodeAnalysis.SuppressMessageAttribute('${1:PSUseDeclaredVarsMoreThanAssignments}', '$2')]" |
| 879 | + "[Diagnostics.CodeAnalysis.SuppressMessageAttribute('${1:PSUseDeclaredVarsMoreThanAssignments}', '')]" |
881 | 880 | ]
|
882 |
| - } |
883 |
| - ,"PSSA warning override decoration.2": { |
884 |
| - "prefix": "Suppress - PSSA", |
885 |
| - "description": "Suppress warnings for a specific class, for a specific function", |
| 881 | + }, |
| 882 | + "Suppress PSScriptAnalyzer Rule on Parameter": { |
| 883 | + "prefix": "suppress-message-rule-for-parameter", |
| 884 | + "description": "Suppress a built-in PSScriptAnalyzer rule on a parameter using the SuppressMessageAttribute", |
| 885 | + "body": [ |
| 886 | + "[Diagnostics.CodeAnalysis.SuppressMessageAttribute('${1:PSUseDeclaredVarsMoreThanAssignments}', '${2:ParamName}')]" |
| 887 | + ] |
| 888 | + }, |
| 889 | + "Suppress PSScriptAnalyzer Rule in Scope": { |
| 890 | + "prefix": "suppress-message-rule-for-scope", |
| 891 | + "description": "Suppress a built-in PSScriptAnalyzer rule for functions or classes in a specific scope using the SuppressMessageAttribute", |
886 | 892 | "body": [
|
887 |
| - "#Suppress warning", |
888 |
| - "[Diagnostics.CodeAnalysis.SuppressMessageAttribute('${1:PSProvideDefaultParameterValue}', '$2', Scope='Function', Target='*')]" |
| 893 | + "[Diagnostics.CodeAnalysis.SuppressMessageAttribute('${1:PSProvideDefaultParameterValue}', '', Scope='Function', Target='${2:*}')]" |
889 | 894 | ]
|
890 | 895 | }
|
891 | 896 | }
|
0 commit comments