Ensure CRLF stays out of the repo

Looks like I already failed that project a little :)

(cherry picked from commit 066771b2d15748edc72095b75c4626bf445266aa)
This commit is contained in:
Octavia Togami 2020-08-15 06:46:24 -04:00 committed by MattBDev
parent fd336feb46
commit 034b910d57
3 changed files with 243 additions and 203 deletions

4
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1,4 @@
# CRLF -> LF
59ccc0a5af93d4b3d97df2bd6b946bba5a6d5c5c
# Checkstyle
eb52afa296fffc4397e2f4014c7eb8094f50240e

36
.gitattributes vendored
View File

@ -1,2 +1,34 @@
*.java diff=java * text=auto
#*.java merge=import-driver #TODO not implemented, I'm just using a merge tool instead # Force Batch files to CRLF
*.bat text=crlf
# Java sources
*.java text diff=java
*.kt text diff=java
*.gradle text diff=java
*.gradle.kts text diff=java
# These files are text and should be normalized (Convert crlf => lf)
*.css text diff=css
*.df text
*.htm text diff=html
*.html text diff=html
*.js text
*.jsp text
*.jspf text
*.jspx text
*.properties text
*.tld text
*.tag text
*.tagx text
*.xml text
# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.dll binary
*.ear binary
*.jar binary
*.so binary
*.war binary
*.jks binary

View File

@ -96,7 +96,7 @@ Checks based on Google Checks, modified for EngineHub.
value="Member name ''{0}'' must match pattern ''{1}''."/> value="Member name ''{0}'' must match pattern ''{1}''."/>
</module> </module>
<module name="ParameterName"> <module name="ParameterName">
<property name="format" value="^([a-z][_a-zA-Z0-9]*|[a-z])$"/> <property name="format" value="^([a-z][a-z0-9][_a-zA-Z0-9]*|[a-z])$"/>
<message key="name.invalidPattern" <message key="name.invalidPattern"
value="Parameter name ''{0}'' must match pattern ''{1}''."/> value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module> </module>
@ -195,6 +195,10 @@ Checks based on Google Checks, modified for EngineHub.
<module name="RegexpMultiline"> <module name="RegexpMultiline">
<property name="format" value="^( +)@(Arg|Switch|Command)\(.*?\r?\n\1 {5,}"/> <property name="format" value="^( +)@(Arg|Switch|Command)\(.*?\r?\n\1 {5,}"/>
</module> </module>
<module name="RegexpMultiline">
<property name="format" value="(?s:(\r\n|\r).*)"/>
<property name="message" value="CRLF and CR line endings are prohibited, but this file uses them."/>
</module>
<module name="SuppressionFilter"> <module name="SuppressionFilter">
<property name="file" value="${config_loc}/checkstyle-suppression.xml"/> <property name="file" value="${config_loc}/checkstyle-suppression.xml"/>
</module> </module>