Skip to content

Commit

Permalink
Use DMD in VcallCtorChecker
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladiwostok committed Sep 23, 2024
1 parent 94cc1ce commit bf60900
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 421 deletions.
10 changes: 6 additions & 4 deletions src/dscanner/analysis/run.d
Original file line number Diff line number Diff line change
Expand Up @@ -841,10 +841,6 @@ private BaseAnalyzer[] getAnalyzersForModuleAndConfig(string fileName,
checks ~= new UndocumentedDeclarationCheck(args.setSkipTests(
analysisConfig.undocumented_declaration_check == Check.skipTests && !ut));

if (moduleName.shouldRun!VcallCtorChecker(analysisConfig))
checks ~= new VcallCtorChecker(args.setSkipTests(
analysisConfig.vcall_in_ctor == Check.skipTests && !ut));

if (moduleName.shouldRun!AllManCheck(analysisConfig))
checks ~= new AllManCheck(args.setSkipTests(
analysisConfig.allman_braces_check == Check.skipTests && !ut));
Expand Down Expand Up @@ -1366,6 +1362,12 @@ MessageSet analyzeDmd(string fileName, ASTCodegen.Module m, const char[] moduleN
config.unused_result == Check.skipTests && !ut
);

if (moduleName.shouldRunDmd!(VcallCtorChecker!ASTCodegen)(config))
visitors ~= new VcallCtorChecker!ASTCodegen(
fileName,
config.vcall_in_ctor == Check.skipTests && !ut
);

foreach (visitor; visitors)
{
m.accept(visitor);
Expand Down
Loading

0 comments on commit bf60900

Please sign in to comment.