-
Notifications
You must be signed in to change notification settings - Fork 36
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
add workflow, checkstyle and configurations #113
Merged
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c015958
add workflow, checkstyle and configurations
harshsennnn 5e870b1
optimised and updated vrs
harshsennnn 1193d41
calling workflow
harshsennnn fdb849b
path fixed
harshsennnn d56819c
call path fixed
harshsennnn bf811aa
Delete command_output.log
harshsennnn 62bb51b
fix indentations
harshsennnn 0dadfc0
indentaions fix
harshsennnn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Call Checkstyle | ||
|
||
on: | ||
pull_request: | ||
branches: ["master", "develop"] | ||
paths: | ||
- '**/*.java' | ||
|
||
jobs: | ||
style-check: | ||
uses: PSMRI/.github/.github/workflows/checkstyle.yml@main | ||
with: | ||
java-version: '17' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?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"/> | ||
|
||
<!-- Checks for Size Violations --> | ||
<module name="FileLength"> | ||
<property name="max" value="500"/> | ||
</module> | ||
<module name="LineLength"> | ||
<property name="max" value="120"/> | ||
</module> | ||
|
||
<module name="TreeWalker"> | ||
<!-- Checks for Naming Conventions --> | ||
<module name="MethodName"/> | ||
<module name="PackageName"/> | ||
<module name="TypeName"/> | ||
<module name="ParameterName"/> | ||
<module name="LocalVariableName"/> | ||
<module name="MemberName"/> | ||
|
||
<!-- Checks for imports --> | ||
<module name="AvoidStarImport"/> | ||
<module name="IllegalImport"/> | ||
<module name="RedundantImport"/> | ||
<module name="UnusedImports"/> | ||
|
||
<!-- Checks for Size Violations --> | ||
<module name="MethodLength"> | ||
<property name="max" value="50"/> | ||
</module> | ||
|
||
<!-- Checks for whitespace --> | ||
<module name="EmptyLineSeparator"/> | ||
<module name="GenericWhitespace"/> | ||
<module name="MethodParamPad"/> | ||
<module name="NoWhitespaceAfter"/> | ||
<module name="NoWhitespaceBefore"/> | ||
<module name="ParenPad"/> | ||
<module name="TypecastParenPad"/> | ||
<module name="WhitespaceAfter"/> | ||
<module name="WhitespaceAround"/> | ||
|
||
<!-- Modifier Checks --> | ||
<module name="ModifierOrder"/> | ||
<module name="RedundantModifier"/> | ||
|
||
<!-- Checks for blocks --> | ||
<module name="EmptyBlock"/> | ||
<module name="LeftCurly"/> | ||
<module name="RightCurly"/> | ||
<module name="NeedBraces"/> | ||
|
||
<!-- Checks for common coding problems --> | ||
<module name="EmptyStatement"/> | ||
<module name="EqualsHashCode"/> | ||
<module name="IllegalInstantiation"/> | ||
<module name="MissingSwitchDefault"/> | ||
<module name="SimplifyBooleanExpression"/> | ||
<module name="SimplifyBooleanReturn"/> | ||
</module> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
Command: shopt -s histappend | ||
Output: | ||
|
||
Exit Code: 0 | ||
---- | ||
Command: pwd | ||
Output: | ||
/home/harsh/HWC-API | ||
Exit Code: 0 | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -435,6 +435,35 @@ | |
</webResources> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
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. @harshsennnn indent looks off |
||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
<version>3.3.1</version> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.puppycrawl.tools</groupId> | ||
<artifactId>checkstyle</artifactId> | ||
<version>10.12.7</version> | ||
</dependency> | ||
</dependencies> | ||
<configuration> | ||
<configLocation>checkstyle.xml</configLocation> | ||
<encoding>UTF-8</encoding> | ||
<consoleOutput>true</consoleOutput> | ||
<failsOnError>true</failsOnError> | ||
<linkXRef>false</linkXRef> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>validate</id> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>check</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Let's remove this.