-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feature/356/add checkstyle GitHub action to Java-SDK pipeline #142
Changes from 6 commits
49d40f5
a41f6e4
c642460
f55c53b
129c8d2
dd646a6
5a4de42
0643e55
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,38 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE module PUBLIC | ||
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" | ||
"https://checkstyle.org/dtds/configuration_1_3.dtd"> | ||
|
||
<module name="Checker"> | ||
<property name="severity" value="error"/> | ||
|
||
<property name="fileExtensions" value="java, properties, xml"/> | ||
|
||
|
||
<!-- This for ignoring specific module when start applying rules so cleaning rules violations would be easier and organized --> | ||
<!-- <module name="BeforeExecutionExclusionFileFilter">--> | ||
<!-- <property name="fileNamePattern" value="/models/"/>--> | ||
<!-- </module>--> | ||
<!-- <module name="BeforeExecutionExclusionFileFilter">--> | ||
<!-- <property name="fileNamePattern" value="/core/"/>--> | ||
<!-- </module>--> | ||
<!-- <module name="BeforeExecutionExclusionFileFilter">--> | ||
<!-- <property name="fileNamePattern" value="/common/"/>--> | ||
<!-- </module>--> | ||
<!-- <module name="BeforeExecutionExclusionFileFilter">--> | ||
<!-- <property name="fileNamePattern" value="/integration/"/>--> | ||
<!-- </module>--> | ||
<!-- <module name="BeforeExecutionExclusionFileFilter">--> | ||
<!-- <property name="fileNamePattern" value="/Agent/"/>--> | ||
<!-- </module>--> | ||
<!-- <module name="BeforeExecutionExclusionFileFilter">--> | ||
<!-- <property name="fileNamePattern" value="/keploy-sdk/"/>--> | ||
<!-- </module>--> | ||
<!-- <module name="BeforeExecutionExclusionFileFilter">--> | ||
<!-- <property name="fileNamePattern" value="/api/"/>--> | ||
<!-- </module>--> | ||
<!-- <module name="BeforeExecutionExclusionFileFilter">--> | ||
<!-- <property name="fileNamePattern" value="/agent/"/>--> | ||
<!-- </module>--> | ||
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. Where are the checks like - AvoidStarImport 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. @charankamarapu 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. Yeah I get it but u can use BeforeExecutionExclusionFileFilter - exclude all files and add all the rules so that there will be no errors. Then other developers will see the rules include each module and work on it . I mean If we don't specify rules what will we be benchmarking our code against? Please add the rules and exclude all the modules/files and also add a screenshot by including one module/file which shows all the errors. 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. Sure on it |
||
|
||
</module> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
|
@@ -66,6 +66,25 @@ | |
<id>release</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.puppycrawl.tools</groupId> | ||
<artifactId>checkstyle</artifactId> | ||
<version>8.31</version> | ||
</dependency> | ||
<dependency> | ||
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. Why is Java SDK added over here ? 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. this runs checkstyle check during release 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. we use profiles to change default build config . As you have already added plugins in . I don't think there is a need to mention them again in profile . Please check this once and remove plugin from profile |
||
<groupId>io.keploy</groupId> | ||
<artifactId>java-sdk</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
<configuration> | ||
<configLocation>checkstyle-config.xml</configLocation> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
|
@@ -189,6 +208,20 @@ | |
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.puppycrawl.tools</groupId> | ||
<artifactId>checkstyle</artifactId> | ||
<version>8.31</version> | ||
</dependency> | ||
</dependencies> | ||
<configuration> | ||
<configLocation>checkstyle-config.xml</configLocation> | ||
</configuration> | ||
</plugin> | ||
<!-- <plugin>--> | ||
<!-- <groupId>org.apache.maven.plugins</groupId>--> | ||
<!-- <artifactId>maven-gpg-plugin</artifactId>--> | ||
|
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.
Is github_token mandatory over here?
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.
this only to catch info for PR but it's not mandatory even when I deleted this line things still work.
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.
I dont think that is required . Remove it if it is not necessary.