9 from argparse
import Namespace
15 Report formats supported by the script.
26 Hold the various shared flags and data
28 :ivar nomos: run nomos scanner
29 :ivar ojo: run ojo scanner
30 :ivar copyright: run copyright scanner
31 :ivar keyword: run keyword scanner
32 :ivar repo: scan whole repo or just diff
33 :ivar diff_dir: directory to scan
34 :ivar allowlist: information from allowlist.json
35 :ivar report_format: Report format to use
39 copyright: bool =
False
42 diff_dir: str = os.getcwd()
43 allowlist: dict[str, list[str]] = {
47 report_format: ReportFormat = ReportFormat.TEXT
51 Update options based on argsparse values.
53 :param args: Argparse from cli
55 if "nomos" in args.operation:
56 self.
nomosnomos =
True
57 if "copyright" in args.operation:
59 if "keyword" in args.operation:
61 if "ojo" in args.operation:
63 if "repo" in args.operation:
65 if self.
nomosnomos
is False and self.
ojoojo
is False and self.
copyrightcopyright
is False \
66 and self.
keywordkeyword
is False:
67 self.
nomosnomos =
True
def update_args(self, Namespace args)