Skip to content

Commit

Permalink
Make locally used functions private
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladiwostok committed Sep 24, 2024
1 parent f018cef commit 299fd2a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/dscanner/analysis/autofix.d
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import dscanner.analysis.config : StaticAnalysisConfig;
import dscanner.analysis.run : analyze, doNothing;
import dscanner.utils : readFile, readStdin;

void resolveAutoFixes(
private void resolveAutoFixes(
ref Message message,
string fileName,
ref ModuleCache moduleCache,
Expand All @@ -30,7 +30,7 @@ void resolveAutoFixes(
tokens, m, analysisConfig, overrideFormattingConfig);
}

void resolveAutoFixes(string messageCheckName, AutoFix[] autofixes, string fileName,
private void resolveAutoFixes(string messageCheckName, AutoFix[] autofixes, string fileName,
ref ModuleCache moduleCache,
scope const(Token)[] tokens, const Module m,
const StaticAnalysisConfig analysisConfig,
Expand Down Expand Up @@ -77,6 +77,7 @@ void resolveAutoFixes(string messageCheckName, AutoFix[] autofixes, string fileN
~ " to resolve autofix with.");
}

///
void resolveAutoFixFromCheck(
ref AutoFix autofix,
BaseAnalyzer check,
Expand All @@ -95,7 +96,7 @@ void resolveAutoFixFromCheck(
);
}

AutoFix.CodeReplacement[] resolveAutoFix(string messageCheckName, AutoFix.ResolveContext context,
private AutoFix.CodeReplacement[] resolveAutoFix(string messageCheckName, AutoFix.ResolveContext context,
string fileName,
ref ModuleCache moduleCache,
scope const(Token)[] tokens, const Module m,
Expand All @@ -109,6 +110,7 @@ AutoFix.CodeReplacement[] resolveAutoFix(string messageCheckName, AutoFix.Resolv
return temp.expectReplacements("resolving didn't work?!");
}

///
void listAutofixes(
StaticAnalysisConfig config,
string resolveMessage,
Expand Down
2 changes: 1 addition & 1 deletion src/dscanner/analysis/rundmd.d
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ MessageSet analyzeDmd(string fileName, ASTCodegen.Module m, const char[] moduleN
*
* If no includes are specified, all modules are included.
*/
bool shouldRunDmd(check : BaseAnalyzerDmd)(const char[] moduleName, const ref StaticAnalysisConfig config)
private bool shouldRunDmd(check : BaseAnalyzerDmd)(const char[] moduleName, const ref StaticAnalysisConfig config)
{
enum string a = check.name;

Expand Down
2 changes: 1 addition & 1 deletion src/dscanner/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import dscanner.outliner;
import dscanner.symbol_finder;
import dscanner.analysis.run;
import dscanner.analysis.config;
import dscanner.analysis.autofix;
import dscanner.analysis.autofix : listAutofixes;
import dscanner.dscanner_version;
import dscanner.utils;

Expand Down

0 comments on commit 299fd2a

Please sign in to comment.