checkstyle & copyright headers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

checkstyle & copyright headers

Jesse White-3
All;

This is just a heads up that we've added Checkstyle in both the 'foundation-2017' and 'develop' branches.

>From now on compilation will fail if the copyright headers are missing, or do not match the expected template.

For reference, the template regex is defined here:

https://github.com/OpenNMS/opennms/blob/34b50cbccc62694056d91327249cf6b05ff55565/checkstyle/src/main/resources/AGPL-LICENSE.regexp.txt

And the list of exceptions is maintained here:

https://github.com/OpenNMS/opennms/blob/34b50cbccc62694056d91327249cf6b05ff55565/checkstyle/src/main/resources/license-suppressions.xml

Aside from the license validation, I've added a simple check to forbid using 'com.google.common.base.Charsets' in favor
of 'java.nio.charset.StandardCharsets':

https://github.com/OpenNMS/opennms/blob/34b50cbccc62694056d91327249cf6b05ff55565/checkstyle/src/main/resources/nms_checks.xml

I've opted to keep the number of checks to a minimum for now, but we can update/extend the list as need be.

Best,
Jesse

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: checkstyle & copyright headers

Ronald Roskens

On Mar 7, 2017, at 10:03 AM, Jesse White <[hidden email]> wrote:

All;

This is just a heads up that we've added Checkstyle in both the 'foundation-2017' and 'develop' branches.

From now on compilation will fail if the copyright headers are missing, or do not match the expected template.


How would one go about getting this setup within their IDE as they develop new code? Is there a way to export the checkstyle configuration and import it into an IDE so things are configured automatically?

While doing a quick internet search, i came across the website for checkstyle, and they have pages for both style configurations and IDE setup.


Ron

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: checkstyle & copyright headers

Ronny Trommer-3
Hi Ron,

this is something Markus von RĂ¼den wrote up. Should be a good starting point


Hope this helps

On 14 Mar 2017, at 13:17, Ronald Roskens <[hidden email]> wrote:


On Mar 7, 2017, at 10:03 AM, Jesse White <[hidden email]> wrote:

All;

This is just a heads up that we've added Checkstyle in both the 'foundation-2017' and 'develop' branches.

From now on compilation will fail if the copyright headers are missing, or do not match the expected template.


How would one go about getting this setup within their IDE as they develop new code? Is there a way to export the checkstyle configuration and import it into an IDE so things are configured automatically?

While doing a quick internet search, i came across the website for checkstyle, and they have pages for both style configurations and IDE setup.


Ron
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

signature.asc (507 bytes) Download Attachment
Loading...