Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WiP: Intial work for Bicep Linter concept * Move DiagnosticExtensions to IDiagnostic * Update to linter messages to use "BCPL" prefix * WiP: merge fix up * fix up merge issues for IDiagnostic * WiP: linter syntax rewrite for concat to Interpolate * Linter Rule BCPL1080: interpolation of single string variable * BCPL1080: fix string empty check * Fix NameEquals comparison * BCPL1060: fix up nested string concatenation reduction * BCP1040: check 'location' properties for literal string definitions * add extension method for name of ObjectPropertySyntax matching * add TODO notes * Add check for IsSecure Parameter * BCPL1070 - remove unneeded dependsOn * BCPL1070 no fix just warning * BCPL1020 and dynamic configuration added * Add a sample settings file * Load linter rules via Reflection * Tests: basic linter analyzer tests * BCPL1000 - Add test harness * BCPL1010: Initial test * BCPL1030: Initial test * Updates for code review comments * clarify naming to indicate base class * Create linter RuleSet through reflection * Code review suggestions on description and error level * set configuration package version to 5.0.0 * revert whitespace changes * Move DependsOnRemovalRewriter to Core to unify and resolve circular dependency * Remove flags for IsCliInvoked in settings and linter rule interface * fix up test for BCPL1030 * Make Analyze in Linter Rule catch exceptions and return a single diagnostic when rule has catastrophic failure * Move pretty print of a syntax element to extension method for SyntaxBase * "Dim" unnecessary code (e.g unused vars) * fix fatal compilation error when lint rules throw * Discard linter rule codes in favor of readable text * fix failed rule code so it won't be localized * Localize rule descriptions * TODO for external linters * move settings within Linter analyzer section called "Core" * Rename tests to remove the old coding scheme * Rewrite Location by Param rule, add tests, part 1 * Add file watching to pick up config changes dynamically * Move default settings to resources and improve perf of configuration load * WiP: settings perf update remove RuleName since we have readable "Code" * WiP: remove debugger launch * Location Set By Param Rule part 2 * Fix crash in param loc rule, fix/restructure tests * add todo * Fix rule descriptions * rouch draft of linter markdown * Add rule docs stubs * Add arm-ttk mention, add rule descriptions and examples * typos * Add full path to docUri * Add markdown table for DiagnosticLevels * ttk blurb updates * linter readme updates * Add gif * correct location * use aka links, change codes to lower case with dashes * WiP: override config in unit tests to silence Linter disagnostics * Unit tests working with linter disabled * create unique aka links, update rule codes per suggestions * @secure decorator, exceptions * missed a reference * add link to create feature request for linter-rule * ttk guidance, prefer-interpolation tweaks * change rule folder to linter-rules, new rule guidance, required param description * fix up merge for IDiagnostic * updated designer generated * Add link to auto add linter-rule tag * fix label in default settings file * Remove ParametersRequiredRule per PM * armTtk347 testcase * Add unused var tests * Add some tests with modules and conditions * minor additions * LocationSetByParameterRuleTests * renamed * Make SecureParameterDefaultRule match TTK * Unit tests for SimplifyInterpolationRuleTests * Fix and add tests for Interpolate-not-concat * fix F5 * WiP: fixing up integration tests to expect linter diagnostics * WiP: fix up Integration tests to expect linter diagnostics * WiP: updating integration tests to handle linter diagnostic expectations * add doc link to linter diagnostics * Minor changes * all rules for saving * Remove LocationSetByParameterRule * another test fixup * Remove UnnecessaryDependsOnRule * remove unused docs * remove unintended change * remove parameters-required.md * Fix bicepsettings.json file in examples * Make CreateDiagnosticForSpan protected and expose AnalyzerDiagnostic as a public class * Remove Enable from Rule contract. Make it an extension method. * correct broken link in readme * typo * fix logic error for IsEnabled * Clean up rule discovery with IsClass, IsPublic, and check for 0 param constructor * Simplify rule class reflection * change bicepsettings.json to bicepconfig.json * Handle exceptions during rule creation * Change level setting in config file Update bicepconfig.json remove InternalsVisibleTo * Update baselines for integration tests with expectation of linter messages * Simplify new line to fix cross-platform testing * baseline diagnostics expectations updates to match newline fix * Update src/Bicep.Core/Analyzers/Linter/LinterAnalyzer.cs * fix build * More linter exception hardening * Use LanguageConstants.IdentifierComparer * fix case-sensitiviy of newGuid * use single quotes, ttk verbage, DiagnosticLevel to level * Guard empy path string * Align resx with rule description markdown files * add output of theAnswer to avoid Linter warning * remove unused lambda * remove testing config files * Change defaults in example config to warnings * use default of Warning for all rule creation * DiagnosticCollectionExtensions => IDiagnosticCollectionExtensions * Fix condition to use established IsInterpolated() method * remove unused extension methods and convert to use IdentifierComparer * clarify Omnisharp diagnostic extensions * fix up baselines for text changes in rules Co-authored-by: jofleish <[email protected]> Co-authored-by: Stephen Weatherford <[email protected]> Co-authored-by: Marcus Felling <[email protected]> Co-authored-by: Marcus Felling <[email protected]> Co-authored-by: Stephen Weatherford (MSFT) <[email protected]>
- Loading branch information