Comments (6)
It has been a week and the only feedback has been positive. @AdamBrousseau can you help make this happen? Thanks.
from openj9.
Would a .gitattribute
file be a better solution? See https://stackoverflow.com/questions/10418975/how-to-change-line-ending-settings for examples of how to use the .gitattribute file to control line endings.
from openj9.
I never did get the result I was hoping for with .gitattributes
, and I believe it depends on users configuring their local clones properly.
from openj9.
I can provide an automatic build that will get the list of files modified/added in a PR
FILES=($(git diff --diff-filter=ACM --name-only origin/$ghprbTargetBranch HEAD))
for filename in ${FILES[@]};
do
# Check line endings
done
@keithc-ca can you provide the check inside the loop. I will add some bits that will collect all the bad files and print them to the console at the end of the job
from openj9.
I ran this over the entire openj9 repository; the files flagged are corrected by #146.
#!/bin/bash -
debug() {
: # echo "$*"
}
error() {
echo "$*"
}
for filename in "$@" ; do
type=$(file -b "$filename")
case "$type" in
empty)
debug "Empty file: '$filename'"
;;
*text*)
# map filename to lowercase with ',,'
case "${filename,,}" in
*.bat | *.cmd)
case "$type" in
*CRLF\ line\ terminators*)
debug "Good windows script: '$filename' type: '$type'"
;;
*)
error "*** ERROR: should have CRLF line terminators: '$filename' type: '$type'"
;;
esac
;;
*)
case "$type" in
*CR*line\ terminators*)
error "*** ERROR: should have LF line terminators: '$filename' type: '$type'"
;;
*)
debug "Good text file: '$filename' type: '$type'"
;;
esac
;;
esac
;;
*)
debug "Non-text file:'$filename' type: '$type'"
;;
esac
done
from openj9.
@keithc-ca I have been testing this in my fork and I think its working as expected.
The temp PR for the script is here
The PR I have been testing with is here
The job is here
It launches automatically on every PR, can launch manually via Jenkins line endings check
Feel free to open a PR at my fork to test.
Please take a look. If you are satisfied, I will fix the repo variable and open a PR here.
from openj9.
Related Issues (20)
- Consolidate j9vm files to single C++ file HOT 3
- Upgrade minimum acceptable cmake version HOT 2
- Update zlib to 1.3.1 or the latest
- HeapHogLoadTest_5m_0_FAILED Segmentation error vmState=0x00000000 HOT 14
- jdk_lang_1_FAILED java/lang/ProcessBuilder/Basic.java#id0 AssertionError: Some tests failed
- Valhalla tests failed to compile HOT 1
- Add implementation for new JNI functions in Valhalla HOT 1
- Assertion failed in testJITServer_0: Pointer for offset could not be found in deserializer shared cache HOT 5
- jdk_util_1_FAILED java/util/ResourceBundle/Bug4168625Test.java testLowMemoryLoadstderr OOM HOT 3
- monitorenter/monitorexit should throw IdentityException on Value Objects
- Build failure on M3: ld: symbol(s) not found for architecture arm64 HOT 2
- jdk_text_0_FAILED java/text/Format/NumberFormat/NumberRegression.java RuntimeException: Uncaught exception thrown in test method Test4122840
- jdk_security3_0_FAILED sun/security/ec/TestEC.java ProviderException: Could not convert keys to native format HOT 6
- testSCCMLTests1_openj9_0_FAILED Required condition was not found HOT 4
- jdk23 View-LE-OffHeap View-BE-OffHeap testChar, testDouble etc expected [true] but found [false] HOT 1
- jdk23 UtilLoadTest_5m crash vmState=0x00040000 Java_java_lang_Thread_interruptImpl omrthread_interrupt pthread_mutex_lock
- ASSERTION FAILED StandardAccessBarrier.cpp:867: ((false && (_scavenger->isMutatorThreadInSyncWithCycle(env)))) HOT 4
- jdk23 alinux build failed configure: error: Option --enable-compatible-cds-alignment is not available
- Clean up references to iiload, iistore, et al.
- Improve object heap allocation for Compressed References JVM for zLinux HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openj9.