diff --git a/main.go b/main.go index bfb49c244..74001db17 100644 --- a/main.go +++ b/main.go @@ -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) } diff --git a/processor/processor.go b/processor/processor.go index 92a2bc3d3..a6e9cb11f 100644 --- a/processor/processor.go +++ b/processor/processor.go @@ -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 = ""