check code quality of java file#4
Open
fathimanabeela wants to merge 3 commits intoUpcode-Software-Labs:mainfrom
Open
check code quality of java file#4fathimanabeela wants to merge 3 commits intoUpcode-Software-Labs:mainfrom
fathimanabeela wants to merge 3 commits intoUpcode-Software-Labs:mainfrom
Conversation
sujithps
reviewed
Apr 6, 2024
| HttpClient client = HttpClient.newHttpClient(); | ||
| HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString()); | ||
|
|
||
| if (response.statusCode() == 200) { |
Contributor
There was a problem hiding this comment.
use HTTPS status code constant instead of 200
| } | ||
|
|
||
| public static String codeCheck(String javaCode) throws CheckstyleException, IOException { | ||
| String result; |
Contributor
There was a problem hiding this comment.
no need to declare the variable here
| } else { | ||
| result = auditListener.getViolationsAsString(); | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
you can use a conditional operator here
| String result; | ||
|
|
||
| // Create a Checkstyle Checker | ||
| Checker checker = new Checker(); |
Contributor
There was a problem hiding this comment.
always try to use final variables. So that the immutability is preserved
| } | ||
|
|
||
| private static File createTempFile(String content) throws IOException { | ||
| File tempFile = File.createTempFile("tempJavaFile", ".java"); |
|
|
||
| @Test | ||
| void example() { | ||
| System.out.println("test"); |
Contributor
|
@fathimanabeela please resolve conflicts |
Author
|
Sir I have done changes in last commit
…On Thu, 11 Apr 2024 at 9:41 AM, Sujith PS ***@***.***> wrote:
@fathimanabeela <https://github.com/fathimanabeela> please resolve
conflicts
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQREAMVWCNLNQBXIIM4LADY4YEPRAVCNFSM6AAAAABF2GC3TSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBYHA4TKMZRGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
have checked the code quality of a java file read from github using checkstyle and updated the result in db