Skip to content

feat: add an option to skip the files greater than a particular size #7190

Open
@DmitriyLewen

Description

@DmitriyLewen

Description

Add --max-file-size flag to skip files greater than a particular size.
See #7151 for more context

requirements:

  1. Update analyzers logic:
    1.1. Add Description() string function into analyzer and PostAnalyzer interfaces. (see Add an option to skip the files greater than a particular size #7151 (reply in thread))
    1.2. Add AllAnalyzersTypes() map[Type]string (type -> description (see 1.1)) function to show all analyzers ( see Add an option to skip the files greater than a particular size #7151 (reply in thread))
  2. add --max-file-size flag.
    2.1. flag format is <analyzer_type>:<max_size> (e.g. --max-file-size jar:200mb --max-file-size secret:5mb)
    2.2. flag should support size with prefix (i mean mb, kb, etc.). I saw that https://github.com/docker/go-units supports that (https://github.com/docker/go-units/blob/16e18b2861ca6fd622e7042ffeb9a3ebe8a9dff9/size.go#L78-L80)
    2.3. ??? i am not sure about this - cli error is supposed to show list of all analyzers when unsupported analyzer is used.
  3. use list of all analyzers (see 1.2) to create/update docs page using mage docs:generate (see Add an option to skip the files greater than a particular size #7151 (reply in thread))

Discussed in #7151

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions