Loading .gitlab/ci/lint.yml +6 −2 Original line number Diff line number Diff line Loading @@ -2,11 +2,15 @@ stage: lint interruptible: true variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" MOZBUILD_STATE_PATH: "$CI_PROJECT_DIR/.cache/mozbuild" cache: paths: - node_modules - .cache/pip - .cache/mozbuild # Store the cache regardless on job outcome when: 'always' # Share the cache throughout all pipelines running for a given branch key: $CI_COMMIT_REF_SLUG eslint: extends: .base Loading .gitlab/ci/scripts/run_linters.py +8 −8 Original line number Diff line number Diff line Loading @@ -98,13 +98,13 @@ if __name__ == "__main__": ) args = parser.parse_args() command = [ "./mach", "lint", "-v", *(s for l in args.linters for s in ("-l", l)), *get_list_of_changed_files(), ] changed_files = get_list_of_changed_files() if changed_files: command = ["./mach", "lint", "-v"] for linter in args.linters: command.extend(["-l", linter]) command.extend(changed_files) result = subprocess.run(command, text=True) sys.exit(result.returncode) else: print("No files changed, skipping linting.") Loading
.gitlab/ci/lint.yml +6 −2 Original line number Diff line number Diff line Loading @@ -2,11 +2,15 @@ stage: lint interruptible: true variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" MOZBUILD_STATE_PATH: "$CI_PROJECT_DIR/.cache/mozbuild" cache: paths: - node_modules - .cache/pip - .cache/mozbuild # Store the cache regardless on job outcome when: 'always' # Share the cache throughout all pipelines running for a given branch key: $CI_COMMIT_REF_SLUG eslint: extends: .base Loading
.gitlab/ci/scripts/run_linters.py +8 −8 Original line number Diff line number Diff line Loading @@ -98,13 +98,13 @@ if __name__ == "__main__": ) args = parser.parse_args() command = [ "./mach", "lint", "-v", *(s for l in args.linters for s in ("-l", l)), *get_list_of_changed_files(), ] changed_files = get_list_of_changed_files() if changed_files: command = ["./mach", "lint", "-v"] for linter in args.linters: command.extend(["-l", linter]) command.extend(changed_files) result = subprocess.run(command, text=True) sys.exit(result.returncode) else: print("No files changed, skipping linting.")