Skip to content

Ignore stdin by default in CI #423

Open
@scop

Description

@scop

One of the nice things of nox are good defaults, no matter if it's run in CI or not.

I thought it'd make sense for gitlint, too. Following the nox implementation, something like this could do the trick:

--- a/gitlint-core/gitlint/config.py
+++ b/gitlint-core/gitlint/config.py
@@ -84 +84 @@ class LintConfig:
-        self._ignore_stdin = options.BoolOption("ignore-stdin", False, ignore_stdin_description)
+        self._ignore_stdin = options.BoolOption("ignore-stdin", "CI" in os.environ, ignore_stdin_description)

Perhaps some additional patching for the test suite would be in order, as it's likely to run also in CI itself, but in principle. Doc updates obviously too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions