[ 
https://issues.apache.org/jira/browse/MENFORCER-499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Elliotte Rusty Harold resolved MENFORCER-499.
---------------------------------------------
    Resolution: Won't Do

This doesn't seem to be common enough a need to justify inclusion in the plugin 
itself. However, new enforcer rules do not have to ship with the plugin.
There are many that are not bundled with the core plugin such as the
extra-enforcer-rules <https://www.mojohaus.org/extra-enforcer-rules/>
and the Java Linkage checker rule
<https://medium.com/google-cloud/squash-java-linkage-bugs-before-they-bite-92af79e31bfd>

It is fine to publish this from your own repo without involving the
Maven Project.

> New Rule: Prohibit specific files to be checked in
> --------------------------------------------------
>
>                 Key: MENFORCER-499
>                 URL: https://issues.apache.org/jira/browse/MENFORCER-499
>             Project: Maven Enforcer Plugin
>          Issue Type: New Feature
>          Components: Standard Rules
>            Reporter: Benjamin Marwell
>            Priority: Major
>
> This is a suggestion for yet another new standard rule.
> "require Files not checked in"
> While there are already rules "require files don't exist" and "require file 
> size", this one would check wether files are actually checked in or added 
> into the current VCS.
> E.g. for each file in the pattern:
> * check if they are added (git, bzr) or checked in (cvs, svn, bzr, git)
> * If so, fail the build.
> configurable options:
> * files (like the other two checks, ant pattern)
> * failOnAdd (git, bzr): true by default, can be set to false. Then the check 
> will only fail if files are currently in a commit.
> * useDefaultExclusions: Read exclusion rules from VCS (git: .gitignore, svn: 
> svn:ignore, etc.). However, files could have been forcibly added in git. So 
> maybe this doesn't make much sense
> * skip
> * ..?
> The idea is to prevent developers from accidentally check in big files (like 
> jar files, zip files) or other binary artifacts. While this could be spotted 
> in a PR, the repo might already be spoiled and enlarged by this size, which 
> is usually not feasible.
> Alternatives:
> * use "files don't exist" and exclude target (may not work for everyone)
> * use a shell script
> * don't implement this rule and leave the task to others.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to