Skip to content

Commit

Permalink
Add qcolor-from-literal fixit to checks.json
Browse files Browse the repository at this point in the history
  • Loading branch information
alex1701c committed Jan 3, 2024
1 parent 98b375a commit 6196f33
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ clazy runs all checks from level1 by default.
- [mutable-container-key](docs/checks/README-mutable-container-key.md)
- [no-module-include](docs/checks/README-no-module-include.md)
- [overloaded-signal](docs/checks/README-overloaded-signal.md)
- [qcolor-from-literal](docs/checks/README-qcolor-from-literal.md)
- [qcolor-from-literal](docs/checks/README-qcolor-from-literal.md) (fix-qcolor-from-literal)
- [qdatetime-utc](docs/checks/README-qdatetime-utc.md) (fix-qdatetime-utc)
- [qenums](docs/checks/README-qenums.md)
- [qfileinfo-exists](docs/checks/README-qfileinfo-exists.md)
Expand Down
7 changes: 6 additions & 1 deletion checks.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,12 @@
"level" : 0,
"categories" : ["performance"],
"visits_stmts" : true,
"ifndef" : "CLAZY_DISABLE_AST_MATCHERS"
"ifndef" : "CLAZY_DISABLE_AST_MATCHERS",
"fixits" : [
{
"name" : "qcolor-from-literal"
}
]
},
{
"name" : "qfileinfo-exists",
Expand Down
3 changes: 2 additions & 1 deletion src/Checks.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,13 @@ void CheckManager::registerChecks()
registerCheck(check<QVariantTemplateInstantiation>("qvariant-template-instantiation", ManualCheckLevel, RegisteredCheck::Option_VisitsStmts));
registerCheck(check<RawEnvironmentFunction>("raw-environment-function", ManualCheckLevel, RegisteredCheck::Option_VisitsStmts));
registerCheck(check<ReserveCandidates>("reserve-candidates", ManualCheckLevel, RegisteredCheck::Option_VisitsStmts));
registerCheck(check<SanitizeInlineKeyword>("sanitize-inline-keyword", ManualCheckLevel, RegisteredCheck::Option_VisitsDecls));
registerFixIt(1, "fix-sanitize-inline-keyword", "sanitize-inline-keyword");
registerCheck(check<SignalWithReturnValue>("signal-with-return-value", ManualCheckLevel, RegisteredCheck::Option_VisitsDecls));
registerCheck(check<ThreadWithSlots>("thread-with-slots", ManualCheckLevel, RegisteredCheck::Option_VisitsStmts | RegisteredCheck::Option_VisitsDecls));
registerCheck(check<TrNonLiteral>("tr-non-literal", ManualCheckLevel, RegisteredCheck::Option_VisitsStmts));
registerCheck(check<UnexpectedFlagEnumeratorValue>("unexpected-flag-enumerator-value", ManualCheckLevel, RegisteredCheck::Option_VisitsDecls));
registerCheck(check<UnneededCast>("unneeded-cast", ManualCheckLevel, RegisteredCheck::Option_VisitsStmts));
registerCheck(check<SanitizeInlineKeyword>("sanitize-inline-keyword", ManualCheckLevel, RegisteredCheck::Option_VisitsDecls));
#ifndef CLAZY_DISABLE_AST_MATCHERS
registerCheck(check<UnusedResultCheck>("unused-result-check", ManualCheckLevel, RegisteredCheck::Option_VisitsStmts));
#endif
Expand Down

0 comments on commit 6196f33

Please sign in to comment.