ruleset.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0"?>
  2. <!--
  3. ~ Nextcloud - Android Client
  4. ~
  5. ~ SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
  6. ~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
  7. -->
  8. <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Android"
  9. xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
  10. xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"
  11. xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
  12. <description>
  13. The ruleset file checks code using rules defined below, new rules can always be added.The
  14. pmd.html file contains the report which includes perceived coding issues
  15. </description>
  16. <exclude-pattern>.*/R.java</exclude-pattern>
  17. <exclude-pattern>.*/gen/.*</exclude-pattern>
  18. <exclude-pattern>.*/third_parties/.*</exclude-pattern>
  19. <rule ref="rulesets/java/logging-java.xml" />
  20. <rule ref="rulesets/java/braces.xml" />
  21. <rule ref="rulesets/java/strings.xml" />
  22. <rule ref="rulesets/java/basic.xml" />
  23. <rule ref="rulesets/java/naming.xml">
  24. <exclude name="AbstractNaming" />
  25. <exclude name="LongVariable" />
  26. <exclude name="ShortMethodName" />
  27. <exclude name="ShortVariable" />
  28. <exclude name="VariableNamingConventions" />
  29. </rule>
  30. <rule ref="rulesets/java/naming.xml/MethodNamingConventions">
  31. <properties>
  32. <property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[matches(@Image, '.*Test$')]" />
  33. </properties>
  34. </rule>
  35. </ruleset>