-
Notifications
You must be signed in to change notification settings - Fork 0
Core functionality to calculate metrics of single method #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 6 commits
36207c1
1719bea
7e4c126
a23db6e
d92b41c
d14e00b
7919d50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| <?xml version="1.0"?> | ||
|
|
||
| <ruleset name="Custom Rules" | ||
| xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"> | ||
|
|
||
| <description> | ||
| My custom rules | ||
| </description> | ||
|
|
||
|
|
||
| <rule ref="category/java/bestpractices.xml"> | ||
| <exclude name="SystemPrintln"/> | ||
| </rule> | ||
| <rule ref="category/java/codestyle.xml"> | ||
| <exclude name="AtLeastOneConstructor"/> | ||
| </rule> | ||
| <rule ref="category/java/design.xml" /> | ||
| <rule ref="category/java/errorprone.xml" /> | ||
|
|
||
| <rule ref="category/java/codestyle.xml/LongVariable"> | ||
| <properties> | ||
| <property name="minimum" value="30" /> | ||
| </properties> | ||
| </rule> | ||
|
|
||
| <rule ref="category/java/bestpractices.xml/JUnitTestContainsTooManyAsserts"> | ||
| <properties> | ||
| <property name="maximumAsserts" value="5" /> | ||
| </properties> | ||
| </rule> | ||
|
|
||
| </ruleset> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| apply plugin: 'java' | ||
| apply plugin: 'application' | ||
| apply plugin: 'pmd' | ||
|
|
||
| group 'com.github' | ||
| version '1.0-SNAPSHOT' | ||
|
||
|
|
||
| repositories { | ||
| mavenCentral() | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation group: 'net.sourceforge.pmd', name: 'pmd-java', version: '6.29.0' | ||
|
||
| implementation 'info.picocli:picocli:4.5.2' | ||
|
|
||
| testImplementation(platform('org.junit:junit-bom:5.7.0')) | ||
| testImplementation('org.junit.jupiter:junit-jupiter') | ||
|
|
||
| testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0") | ||
| } | ||
|
|
||
| pmd { | ||
| consoleOutput = true | ||
| ruleSetFiles = files("PMDRuleSet.xml") | ||
| } | ||
|
|
||
| test { | ||
| useJUnitPlatform() | ||
| } | ||
|
|
||
| application { | ||
| mainClassName = 'com.github.emcat.Emcat' | ||
| applicationDefaultJvmArgs = ["--enable-preview"] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better not to use preview features
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In further PRs I get rid of preview mode and migrate to java 11. |
||
| } | ||
|
|
||
| run{ | ||
| standardInput = System.in | ||
| } | ||
|
|
||
| sourceCompatibility = 14 | ||
| targetCompatibility = 14 | ||
|
|
||
| tasks.withType(JavaCompile) { | ||
| options.compilerArgs += '--enable-preview' | ||
| } | ||
|
|
||
| tasks.withType(Test) { | ||
| jvmArgs += "--enable-preview" | ||
| } | ||
|
|
||
| tasks.withType(JavaExec) { | ||
| jvmArgs += '--enable-preview' | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to start with correct group - for example - you nick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean
com.github.aravij?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.