Граф коммитов

7 Коммитов

Автор SHA1 Сообщение Дата
Dmitry 44933030c4
Support non-backtracking regex (#528) 2023-03-07 13:53:51 -08:00
Gabe Stocco 60f166d8cf
Adds DependsOnTags field to Rule (#533)
Fix #533 

* Adds DependsOnTags field to Rule

After processing of rules DependsOnTags will be checked and then matches whose matching rule have required tags which are not all present in the UniqueTags will be removed before returning results. Adds tests for new functionality and rule verifier will check to make sure all tags which are depended on are present in the rule set.

SemVer changes. Public properties in the Rule object have been changed to IList from a combination of Array and List.

* Fix query for rules with null depends on field

* Formatting: Add Missing Braces Back

* Revert "Formatting: Add Missing Braces Back"

This reverts commit d6dc1fc5a7.

* Set beta flag

* Fix Verification message for missing depends_on_tags

Change a few more List to IList.
Improve edge case in verification where if two rules shared the same id they would both receive the error message about depends_on_tags.

* Improve description for test rules

* Formatting and additional comments on the Rule and AnalyzeCommand objects

* Catch edge case in verification where an overridden rule doesn't have the depends on of its overrider

This verification step prevents a potential issue if a ruleset contains Rule A, which is Overridden by Rule B which depends on TagX.

If RuleA and RuleB match, but TagX is not present, no results would be returned. This is because overrides are performed on a file by file basis, as the last step in processing each file. Depends on tags are checked after all files have been processed, and so the overridden matches are no longer tracked.

* Adds Support for Chained Dependent Rules

And tests for same.

* Typo in test rule description

* Small refactor to deduplicate logic

* Improve variable names
2023-03-07 12:32:59 -08:00
Gabe Stocco f65bd19c5c
Remove beta flag in version.json (#505)
* Remove beta flag in version.json

* Add the new ruleverifier options to the pack command.

* Typos

* Run formatting - no logic changes.

* Update Dependencies

* Refactor tests a bit

* Fix template issue after reformatting. Add missing integrity flags.
2022-08-30 15:09:42 -07:00
Gabe Stocco 08a67bb7d5
Fix #461 (#463)
Attempt to create the HTML report regardless of analysis status.

Adds a new string to clarify when the failure is due to having no source files.
2022-06-22 01:50:27 -07:00
Gabe Stocco deef493692
Rewrite logging, tests, add user customizable languages. (#441)
* Fix most of logging in Analyze Command

* ConvertTagDiff command

* Finish conversion of Analyze

* Rewrite logging

* Bump version. These changes change API surfaces and CLI arguments.

* More fixes.

* More test improvements

* More test fixes.

* Fix analyze tests

* Incrementally adding tests for untested parameters.

* Fix tests for everything except timeouts in analyze command.

* Add logger factory to the tests. Start on verify rules cmd.

* Refactor VerifyRules + Fix Tests to cover all cases checked for AI rules.

* Remove RulePacker, just embed all rules directly

* Existing nuget tests fixed.

* More fixes. start implementing custom languages and comments.

* Fix #418

* Remove unused examples

Remove old CLI tests

* Generate and publish code coverage in pipeline

* Clean up unused resources.

* Update dotnet-test-job.yml

* Update dotnet-test-job.yml

* Add SeverityLevel option.

* Add applies to filename test

* Add override test

* Update TestAnalyzeCmd.cs

* Tests and refactoring/renaming.

* More tests for malformed within clauses.

* Rename Test folder

Fix pipeline
More withinclause tests

* Improvements

* Fix option parsing

* More test coverage for Languages.cs.

* Refactor. Removing Newtonsoft dependency.

* Re-add support for netcore3.1 to lib

* Support netstandard2.1 instead.

* Refactor and Cleanup

Allows tests to run on netstandard by moving the logoptions to a separate project.

* Fixes for #442 and #443 (#444)

* Update bug report

Co-authored-by: Michael Scovetta <michael.scovetta@microsoft.com>
2022-04-29 11:50:23 -07:00
Gabe Stocco 80004398e2
Linting recommendations. (#416) 2022-01-10 13:38:17 -08:00
Gabe Stocco 4ce91639d6
Fix Producing Both JSON and HTML reports (#379)
* Don't produce both JSON and HTML

* Bump Dependencies

* Fix eample in options

* Refactor Logging into Common Libary

* Fix GetTags Behavior

* Add option to skip collecting file metadata

* Reduce amount gathering by excerpt to avoid gathering huge amounts of data

* Explain new context-lines behavior in Options description

* Add test for multifile tags behavior

* Unify how rules are gotten between regular and async

* Improve cache behavior
2021-05-27 09:13:17 -07:00