Skip to content

Commit

Permalink
start to add params
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Sep 4, 2020
1 parent cd7726b commit 579e81c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,19 @@ func main() {
"have multiple format output overriding --format [e.g. tabular:stdout,csv:file.csv,json:file.json]",
)

flags.StringVar(
&processor.UnknownRemap,
"unknown-remap",
"",
"inspect files of unknown type and remap by checking for a string and remapping the language [e.g. \"-*- C++ -*-\":\"C Header\"]",
)
flags.StringVar(
&processor.HardRemap,
"hard-remap",
"",
"inspect every file and remap by checking for a string and remapping the language [e.g. \"-*- C++ -*-\":\"C Header\"]",
)

if err := rootCmd.Execute(); err != nil {
os.Exit(1)
}
Expand Down
6 changes: 6 additions & 0 deletions processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ var Format = ""
// FormatMulti is a rule for defining multiple output formats
var FormatMulti = ""

// UnknownRemap allows remapping of unknown files with a string to search the content for
var UnknownRemap = ""

// HardRemap allows remapping of all files with a string to search the content for
var HardRemap = ""

// FileOutput sets the file that output should be written to
var FileOutput = ""

Expand Down

0 comments on commit 579e81c

Please sign in to comment.