#1667 closed Task (fixed)
Create a script for automatic line-ending corrections
Reported by: | Frederico Caldeira Knabben | Owned by: | Wiktor Walc |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.6 |
Component: | General | Version: | |
Keywords: | Cc: |
Description
We need a PHP script inside _dev which correct the line ending of all files in the project.
The following must be true after running it:
- Perl files (.pl and .cgi) have LF line-ends.
- All other files must have CRLF line-ends.
This file is supposed to be used prior releases to uniformize the code.
Change History (12)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Applied with [1359]. I'm waiting for bug reports now ;)
comment:3 Changed 17 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It is nice to see when someone loves the things he do :) I would have implemented a much simpler solution (load, regex replace, save) :P Pretty cool Wiktor!
Some question / requests:
- Does it go recursively through the folders?
- It must ignore attribute hidden files and folder (like the .svn folder). Is it ok with it?
- Can it receive the path as a parameter in the command prompt call?
- Can you also append a fixlineends.bat, which runs it in the entire editor folder (../)?
comment:4 Changed 17 years ago by
Keywords: | Discussion added |
---|
comment:5 Changed 17 years ago by
Keywords: | Discussion removed |
---|
comment:6 Changed 17 years ago by
Owner: | set to Wiktor Walc |
---|---|
Status: | reopened → new |
comment:7 Changed 17 years ago by
New version committed with [1411], [1412].
- It depends on the --maxdepth parameter.
- You mean files with "hidden" flag in Windows? There are few options to control it:
--excluderegex=regex --noarchive --nodotfiles --nohidden --nosystem
- Yes.
- Done, I hope this script still works :P
php fixlineends.php --help
comment:8 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Amazing job Wiktor. It worked pretty well for the first massive line endings fix (#1811).
comment:9 Changed 17 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The *.pl and *.cgi files in FCKeditor 2.6 and nightly build still have dos style linefeeds (CRLF), so something went wrong.
Regards
Friedrich
comment:10 Changed 17 years ago by
Nightly builds fromt here: http://dev.fckeditor.net/wiki/SVN contain files from 26 Nov 2007!!
I checked out SVN and everything seems to be O.K. there.
Sorry for the confusion!
Regards Friedrich
comment:11 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Script for automatic line-ending corrections seems to work fine, SVN contain files with valid line endings (LF).
Nightly build is created from "trunk": http://dev.fckeditor.net/browser/FCKeditor/trunk and to get the most recent version of FCKeditor from SVN, check out the trunk with:
svn co http://svn.fckeditor.net/FCKeditor/trunk fckeditorsvn
I'm closing this ticket because it is about creating script fixing line corrections, I will create a separate ticket regarding the problem with .pl and .cgi files.
comment:12 Changed 17 years ago by
For future references, I have created a separate ticket regarding issue reported by bitsfritz: #2243
Additionally, this tool could remove spaces and tabs at the end of the lines.