Re: Detect line endings
Oliver Burn <[email protected]> Mon, 11 Jul 2011 11:33:06 +1000
| Newsgroups | gmane.comp.java.audit.checkstyle.user |
|---|---|
| Message-ID | <CAHZftdXOHAKYXjRu15X1-o3rRA-dZd0bW+KEGnA3oexTvbHXZA@mail.gmail.com> |
Hi, You could write a custom check using NewlineAtEndOfFileCheck as a template for how to detect line endings. Personally, I would recommend using the Source Control system to enforce the line-endings. I know that both Subversion and Mercurial support enforcing line-endings on commit. This is a better solution. On Sat, Jul 9, 2011 at 03:17, Wetzold, Robert <[email protected]>wrote: > Hi,**** > > ** ** > > is it possible to check which line encoding has been used in our java and > xml files with checkstyle? We want to *enforce unix line endings* and get > an error if someone checks in files with different encodings (e.g. windows > or mac).**** > > ** ** > > ** ** > > Regards, Robert**** > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > Checkstyle-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/checkstyle-user > > ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Checkstyle-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/checkstyle-user