configure checkstyle rules

Are there examples of how to configure checkstyle to find the rules externally?  I have tried hosting it on another server I have (which uses https) and it won't let me save the config, even though I can access the URL without authenticating.  I have also tried to create a Stash repo to put the rules into a central location and it saves, but then at run time I get: 

Detected a problem while running static code analysis with Checkstyle: "unable to parse configuration stream - Element type "html" must be declared.:1:32". Check the Stash server logs for details.

My styles looks almost like the default:

<?xml version="1.0"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="Translation"/>
<module name="TreeWalker">
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="MethodLength"/>
<module name="ParameterNumber"/>
<module name="AvoidInlineConditionals"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MissingSwitchDefault"/>
<!-- <module name="RedundantThrows"/> -->
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>
<module name="UpperEll"/>
</module>
</module>

1 answer

As a follow up, I was able to host them on an server which uses http and the plugin was able to pull the ruleset.  I suspect it didn't like my SSL certs on the first server,  but examples of how to host them directly in stash (in a central stash repo) would be great.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

60 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you