Re: Detect line endings

Oliver Burn <[email protected]> Tue, 12 Jul 2011 07:31:10 +1000
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <CAHZftdXK=oAUYAMrb=a1oD99PZ0Gdh6-tkMcgF6oHMdKvM_ekA@mail.gmail.com>
Patches are always welcome

On Mon, Jul 11, 2011 at 22:36, Wetzold, Robert <[email protected]>wrote:

> Hi, ****
>
> ** **
>
> we are using git and yes although it is possible one cannot ensure in an
> open source scenario that everybody will have the correct local
> configuration. We ran into merge conflicts several times already. This is
> why we want to have a simple check in our Hudson Voter to signal if the line
> endings are ok. ****
>
> ** **
>
> Thank you for the tip with the EOF check. I adapted it to implement the EOL
> check and it works just as needed. If somebody else sees that this might be
> of benefit I can also clean it up a little and contribute it.****
>
> ** **
>
> ** **
>
> Greetings, Robert****
>
> ** **
>
> *From:* Oliver Burn [mailto:[email protected]]
> *Sent:* Montag, 11. Juli 2011 03:33
> *To:* [email protected]
> *Subject:* Re: [Checkstyle-user] Detect line endings****
>
> ** **
>
> 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
>
>

------------------------------------------------------------------------------
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