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>
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.