Skip to content

Commit 3a38594

Browse files
tomoyamachiknqyf263
authored andcommitted
to be able add required files (fanal#22)
* to be able add required files * fix typo
1 parent 6c02a38 commit 3a38594

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

analyzer/analyzer.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ var (
1919
pkgAnalyzers []PkgAnalyzer
2020
libAnalyzers []LibraryAnalyzer
2121
commandAnalyzers []CommandAnalyzer
22+
additionalFiles []string
2223

2324
// ErrUnknownOS occurs when unknown OS is analyzed.
2425
ErrUnknownOS = xerrors.New("Unknown OS")
@@ -87,8 +88,13 @@ func RegisterLibraryAnalyzer(analyzer LibraryAnalyzer) {
8788
libAnalyzers = append(libAnalyzers, analyzer)
8889
}
8990

91+
func AddRequiredFilenames(filenames []string) {
92+
additionalFiles = append(additionalFiles, filenames...)
93+
}
94+
9095
func RequiredFilenames() []string {
9196
filenames := []string{}
97+
filenames = append(filenames, additionalFiles...)
9298
for _, analyzer := range osAnalyzers {
9399
filenames = append(filenames, analyzer.RequiredFiles()...)
94100
}

0 commit comments

Comments
 (0)