mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-20 07:37:47 +01:00
Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 930-captcha-for-register
This commit is contained in:
commit
9afd8679e9
@ -1,31 +1,45 @@
|
|||||||
engines:
|
version: '2' # required to adjust maintainability checks
|
||||||
duplication:
|
|
||||||
enabled: true
|
plugins:
|
||||||
config:
|
|
||||||
languages:
|
|
||||||
- java
|
|
||||||
- php
|
|
||||||
checkstyle:
|
checkstyle:
|
||||||
enabled: true
|
enabled: true
|
||||||
channel: beta
|
config:
|
||||||
config: '.checkstyle.xml'
|
file: '.checkstyle.xml'
|
||||||
pmd:
|
|
||||||
enabled: true
|
checks:
|
||||||
channel: beta
|
# We disable all the following CodeClimate checks: Checkstyle already checks for these things and has the advantage
|
||||||
checks:
|
# that the Checkstyle config can also be used in one's IDE.
|
||||||
AvoidUsingHardCodedIP:
|
argument-count:
|
||||||
enabled: false
|
enabled: false
|
||||||
ratings:
|
complex-logic:
|
||||||
paths:
|
enabled: false
|
||||||
# Check only production files
|
file-lines:
|
||||||
- 'src/main/java/**'
|
enabled: false
|
||||||
exclude_paths:
|
method-complexity:
|
||||||
# Exclude code from third-party sources
|
enabled: false
|
||||||
- 'src/main/java/fr/xephi/authme/mail/OAuth2Provider.java'
|
method-count:
|
||||||
- 'src/main/java/fr/xephi/authme/mail/OAuth2SaslClient.java'
|
enabled: false
|
||||||
- 'src/main/java/fr/xephi/authme/mail/OAuth2SaslClientFactory.java'
|
method-lines:
|
||||||
- 'src/main/java/fr/xephi/authme/security/crypts/BCryptService.java'
|
enabled: false
|
||||||
- 'src/main/java/fr/xephi/authme/security/crypts/PhpBB.java'
|
nested-control-flow:
|
||||||
- 'src/main/java/fr/xephi/authme/security/crypts/Whirlpool.java'
|
enabled: false
|
||||||
- 'src/main/java/fr/xephi/authme/security/crypts/Wordpress.java'
|
return-statements:
|
||||||
- 'src/test/java/**Test.java'
|
enabled: false
|
||||||
|
similar-code:
|
||||||
|
enabled: false
|
||||||
|
# The "identical-code" check would be cool to enable since Checkstyle offers no such functionality, but it is
|
||||||
|
# too aggressive and we'd have to suppress many reported warnings.
|
||||||
|
identical-code:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
exclude_patterns:
|
||||||
|
# Exclude code from third-party sources
|
||||||
|
- 'src/main/java/fr/xephi/authme/mail/OAuth2Provider.java'
|
||||||
|
- 'src/main/java/fr/xephi/authme/mail/OAuth2SaslClient.java'
|
||||||
|
- 'src/main/java/fr/xephi/authme/mail/OAuth2SaslClientFactory.java'
|
||||||
|
- 'src/main/java/fr/xephi/authme/security/crypts/BCryptService.java'
|
||||||
|
- 'src/main/java/fr/xephi/authme/security/crypts/PhpBB.java'
|
||||||
|
- 'src/main/java/fr/xephi/authme/security/crypts/Whirlpool.java'
|
||||||
|
- 'src/main/java/fr/xephi/authme/security/crypts/Wordpress.java'
|
||||||
|
# Don't check test classes
|
||||||
|
- 'src/test/java/**/*Test.java'
|
||||||
|
@ -24,7 +24,7 @@ public class CodeClimateConfigTest {
|
|||||||
public void shouldHaveExistingClassesInExclusions() {
|
public void shouldHaveExistingClassesInExclusions() {
|
||||||
// given / when
|
// given / when
|
||||||
FileConfiguration configuration = YamlConfiguration.loadConfiguration(new File(CONFIG_FILE));
|
FileConfiguration configuration = YamlConfiguration.loadConfiguration(new File(CONFIG_FILE));
|
||||||
List<String> excludePaths = configuration.getStringList("exclude_paths");
|
List<String> excludePaths = configuration.getStringList("exclude_patterns");
|
||||||
|
|
||||||
// then
|
// then
|
||||||
assertThat(excludePaths, not(empty()));
|
assertThat(excludePaths, not(empty()));
|
||||||
@ -49,7 +49,7 @@ public class CodeClimateConfigTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void removeTestsExclusionOrThrow(List<String> excludePaths) {
|
private static void removeTestsExclusionOrThrow(List<String> excludePaths) {
|
||||||
boolean wasRemoved = excludePaths.removeIf("src/test/java/**Test.java"::equals);
|
boolean wasRemoved = excludePaths.removeIf("src/test/java/**/*Test.java"::equals);
|
||||||
assertThat("Expected an exclusion for test classes",
|
assertThat("Expected an exclusion for test classes",
|
||||||
wasRemoved, equalTo(true));
|
wasRemoved, equalTo(true));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user