Princeton-LSI-ResearchComputing / tracebase

Mouse Metabolite Tracing Data Repository for the Rabinowitz Lab
MIT License
4 stars 1 forks source link

Why do I get superlinter errors locally that I don't get from the github actions? #761

Closed hepcat72 closed 1 month ago

hepcat72 commented 1 year ago

FEATURE REQUEST

Inspiration

When I run superlinter locally, I get these errors:

2023-09-29 15:59:27 [INFO]   File:[/tmp/lint/DataRepo/example_data/testing_data/accucor_with_multiple_labels/accucor_bad_label.xlsx]
2023-09-29 15:59:27 [ERROR]   Found errors in [editorconfig-checker] linter!
2023-09-29 15:59:27 [ERROR]   This file should have failed test case!
2023-09-29 15:59:27 [ERROR]   Error code: 0. Command output:
------
2023-09-29 15:59:52 [INFO]   File:[/tmp/lint/DataRepo/example_data/testing_data/accucor_with_multiple_labels/accucor_bad_label.xlsx]
2023-09-29 15:59:52 [ERROR]   Found errors in [gitleaks] linter!
2023-09-29 15:59:52 [ERROR]   This file should have failed test case!
2023-09-29 15:59:52 [ERROR]   Error code: 0. Command output:
------
2023-09-29 16:01:43 [INFO]   File:[/tmp/lint/DataRepo/example_data/small_dataset/small_obob_maven_6eaas_inf_glucose_2.xlsx]
2023-09-29 16:01:44 [ERROR]   Found errors in [jscpd] linter!
2023-09-29 16:01:44 [ERROR]   Error code: 1. Command output:
------
Error: ENOTDIR: not a directory, scandir '/tmp/lint/DataRepo/example_data/small_dataset/small_obob_maven_6eaas_inf_glucose_2.xlsx'
    at Object.readdirSync (node:fs:1420:3)
    at readdir (/node_modules/@nodelib/fs.scandir/out/providers/sync.js:37:31)
    at Object.read (/node_modules/@nodelib/fs.scandir/out/providers/sync.js:10:12)
    at SyncReader.scandirSync [as _scandir] (/node_modules/@nodelib/fs.scandir/out/index.js:16:17)
    at SyncReader._handleDirectory (/node_modules/@nodelib/fs.walk/out/readers/sync.js:28:34)
    at SyncReader._handleQueue (/node_modules/@nodelib/fs.walk/out/readers/sync.js:23:18)
    at SyncReader.read (/node_modules/@nodelib/fs.walk/out/readers/sync.js:15:14)
    at SyncProvider.read (/node_modules/@nodelib/fs.walk/out/providers/sync.js:11:29)
    at ReaderSync.walkSync [as _walkSync] (/node_modules/@nodelib/fs.walk/out/index.js:18:21)
    at ReaderSync.dynamic (/node_modules/fast-glob/out/readers/sync.js:13:21) {
  errno: -20,
  syscall: 'scandir',
  code: 'ENOTDIR',
  path: '/tmp/lint/DataRepo/example_data/small_dataset/small_obob_maven_6eaas_inf_glucose_2.xlsx'
}
------
2023-09-29 16:02:00 [INFO]   File:[/tmp/lint/DataRepo/example_data/testing_data/accucor_with_multiple_labels/accucor_bad_label.xlsx]
2023-09-29 16:02:01 [ERROR]   Found errors in [jscpd] linter!
2023-09-29 16:02:01 [ERROR]   This file should have failed test case!
2023-09-29 16:02:01 [ERROR]   Error code: 0. Command output:
------
2023-09-29 16:05:17 [INFO]   File:[/tmp/lint/.github/pull_request_template.md]
2023-09-29 16:05:18 [ERROR]   Found errors in [markdownlint] linter!
2023-09-29 16:05:18 [ERROR]   Error code: 1. Command output:
------
/tmp/lint/.github/pull_request_template.md:49:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2]
/tmp/lint/.github/pull_request_template.md:50:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2]
/tmp/lint/.github/pull_request_template.md:51:1 MD005/list-indent Inconsistent indentation for list items at the same level [Expected: 2; Actual: 0]
/tmp/lint/.github/pull_request_template.md:56:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2]
/tmp/lint/.github/pull_request_template.md:57:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2]
/tmp/lint/.github/pull_request_template.md:58:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2]
/tmp/lint/.github/pull_request_template.md:59:1 MD005/list-indent Inconsistent indentation for list items at the same level [Expected: 2; Actual: 0]
/tmp/lint/.github/pull_request_template.md:64:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2]
/tmp/lint/.github/pull_request_template.md:65:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2]
/tmp/lint/.github/pull_request_template.md:66:1 MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 2]
------
2023-09-29 16:11:52 [ERROR]   ERRORS FOUND in EDITORCONFIG:[1]
2023-09-29 16:11:52 [ERROR]   ERRORS FOUND in GITLEAKS:[1]
2023-09-29 16:11:52 [ERROR]   ERRORS FOUND in JSCPD:[2]
2023-09-29 16:11:52 [ERROR]   ERRORS FOUND in MARKDOWN:[1]
2023-09-29 16:11:52 [FATAL]   Exiting with errors found!

Description

Do other people get these errors when running superlinter locally? If not, how are you calling it? I'm calling it with:

docker run --pull=always -e 'FILTER_REGEX_EXCLUDE=(\.pylintrc|migrations|static\/bootstrap.*|.*templates\/DataRepo\/search\/downloads\/download_.*\.tsv)' -e LINTER_RULES_PATH=/ -e IGNORE_GITIGNORED_FILES=true -e RUN_LOCAL=true -v /Users/rleach/PROJECT-local/TRACEBASE/tracebase/:/tmp/lint github/super-linter:slim-v4.9.4

Alternatives

None

Dependencies

None

Comment

None


ISSUE OWNER SECTION

Assumptions

  1. List of assumptions that the code will not explicitly address/check
  2. E.g. We will assume input is correct (explaining why there is no validation)

Limitations

  1. A list of things this work will specifically not do
  2. E.g. This feature will only handle the most frequent use case X

Affected Components

Requirements

DESIGN

Interface Change description

None provided

Code Change Description

None provided

Tests

hepcat72 commented 1 month ago

This is due to "bad" being in the filename. It's a known bug in the linters.