Skip to content

Allow to specify a working directory #51

Closed

Description

@rixx

flake8 automatically reads configuration from files like setup.cfg – however, my setup.cfg is placed in my src directory. With this (very cool, btw) action, my settings file would never get parsed, because it will invoke flake8 src.

I'd like to suggest a new option, "working-directory", to allow for this kind of scenario.

Activity

  1. TrueBrain commented on May 17, 2024

    @TrueBrain
    Owner

    Can I ask why your setup.cfg is in src? That is most unusual :) Most Python tooling assumes these kind of files are all in the root of the git repo.

    Anyway, not judging. Adding your suggestion seems low-effort, so I will see what I can do :)

  2. rixx commented on May 17, 2024

    @rixx
    Author

    Before switching to pyproject.toml, my setup.py file was also located in src, so it seemed logical to keep setup.cfg next to it. As all code lives inside src, there's no real reason to keep the config file further up, and to clutter the root directory needlessly.

  3. TrueBrain commented on May 17, 2024

    @TrueBrain
    Owner

    I just pushed this change, and is available under v2 (as it is backwards compatible). Please test it out and let me know if it works as expected. Syntax available here:

    https://github.com/TrueBrain/actions-flake8?tab=readme-ov-file#parameter-working_directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions