Skip to content

Enforce size bounds on directoriesΒ #366

Closed

Description

@zabetak

New feature, improvement proposal

Currently there is the RequireFilesSize rule that is able to put bounds on individual files. In similar spirit I would like to enforce size bounds on entire directories.

The main motivation comes from the target directory that tends to store all kind of information from jar artifacts to test logs, reports, and many other things. It is not uncommon, that small seemingly innocent changes (e.g., adding a new test) can make the target directory unreasonably large consuming many GB of disk space. When such changes sneak into the project there is a high risk of causing CI/CD instability and intermittent failures that may be hard to notice.

We could consider either enhancing the existing rule and allowing the <file> to denote directories and change the logic to compute recursively the total size of the directory or add a new rule dedicated to directories (RequireDirectorySize).

Activity

  1. zabetak commented on May 23, 2025

    @zabetak
    MemberAuthor

    If the community feels that this is useful request, please let me know and I can submit a pull request.

  2. added 4 commits that reference this issue on Jun 2, 2025
    32ad99d
    32a7a25
    98d8fb5
    5290d34
  3. zabetak commented on Jun 3, 2025

    @zabetak
    MemberAuthor
  4. added this to the 3.6.0 milestone on Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions