super-linter: JSON linting still very slow on medium size files

Is there an existing issue for this?

Current Behavior

I have approximaely 300 mb+ of json files linting in my code base with the biggest files being about 150kb so not huge. This is taking several hours to lint on standard Github runners. A little slow but several hours seems the wrong order of magnitude for JSON linting which should be fairly processor light process.

When debugging is enabled I can see lots of other linters are running despite only having json linting enabled.

Expected Behavior

  • Settings show can either enable the linters you want to run or disable the ones you don’t. When enabling just JSON linting the expectation would be that only that is run, the majority of use cases of JSON linting do not need to check whether correctly validated as ARM file for example.
  • Takes a few minutes to run

Super-Linter version

v5.7.2 which as of writing is the latest version

Relevant log output

....

2023-12-27 21:56:33 [DEBUG]   File:[/path/subpath/xxx.json], File_type:[json], Base_file:[xxx.json]
2023-12-27 21:56:33 [DEBUG]   Checking if /path/subpath/xxx.json is an OpenAPI file...
2023-12-27 21:56:33 [DEBUG]   /path/subpath/xxx.json is NOT an OpenAPI descriptor
2023-12-27 21:56:33 [DEBUG]   Checking if /path/subpath/xxx.json is an ARM file...
2023-12-27 21:56:33 [DEBUG]   Checking if /path/subpath/xxx.json is a Cloud Formation file...
2023-12-27 21:56:33 [DEBUG]   Checking if /path/subpath/xxx.json is a AWS states descriptor...

...

Steps To Reproduce

Github Workflow Config

      - name: Lint Code Base
        id: super
        uses: super-linter/super-linter/slim@v5.7.2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          VALIDATE_ALL_CODEBASE: true 
          VALIDATE_JSON: true
          FILTER_REGEX_INCLUDE: (./some_location\/.*)
          ACTIONS_RUNNER_DEBUG: true

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 25

Most upvoted comments

Quick update: we are almost done with the preparatory PRs!