Skip to content
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

Fix new line in comments. #11

Merged
merged 4 commits into from
Aug 30, 2024
Merged

Fix new line in comments. #11

merged 4 commits into from
Aug 30, 2024

Conversation

random1223
Copy link
Contributor

No description provided.

}


} catch (JsonProcessingException e) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codety
CodetyBot:

  • 🔴 [Error Prone] [EmptyCatchBlock] Avoid empty catch blocks

Copy link

github-actions bot commented Aug 30, 2024

Codety
Issues found in this pull request based on Codety's default factory settings:

Java source code

File Issue
../scanner/analyzer/checkov/CheckovCodeAnalyzer.java 🔴 [Code Style] [UnnecessaryImport] Unused import 'java.io.File' view
..anner/analyzer/checkov/CheckovResultConverter.java 🔴 [Error Prone] [AvoidLiteralsInIfCondition] Avoid using literals in if statements view
🔴 [Code Style] [UnnecessaryImport] Unused import 'io.codety.scanner.analyzer.checkov.dto.*' view
🔴 [Code Style] [UnnecessaryImport] Unused import 'com.fasterxml.jackson.core.JsonProcessingException' view
..anner/analyzer/checkov/dto/CheckovCheckResult.java ⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'evaluated_keys' doesn't match '[a-z][a-zA-Z0-9]*' view
..anner/analyzer/checkov/dto/CheckovFailedCheck.java ⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'added_date' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'removed_date' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'added_by' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'removed_commit_hash' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'added_commit_hash' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'validation_status' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'definition_context_file_path' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'check_len' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'connected_node' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'vulnerability_details' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'short_description' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'bc_category' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'resource_address' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'caller_file_line_range' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'caller_file_path' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'entity_tags' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'fixed_definition' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'check_class' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'file_line_range' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'repo_file_path' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'file_abs_path' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'file_path' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'code_block' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'check_result' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'check_name' doesn't match '[a-z][a-zA-Z0-9]' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'bc_check_id' doesn't match '[a-z][a-zA-Z0-9]
' view
⚪ [Code Style] [FormalParameterNamingConventions] The method parameter name 'check_id' doesn't match '[a-z][a-zA-Z0-9]*' view

The issue list was truncated due to too many issues were found in this pull request

Java test case code

File Issue
..lyzer/codety/CodetyDefaultFactoryAnalyzerTest.java 🔴 [Code Style] [EmptyControlStatement] Empty if statement view
⚪ [Best Practices] [SystemPrintln] Usage of System.out/err view
..canner/analyzer/eslint/EslintCodeAnalyzerTest.java 🔴 [Code Style] [UnnecessaryImport] Unused import 'java.nio.file.Files' view
../scanner/analyzer/pmd/JavaPmdCodeAnalyzerTest.java 🔴 [Error Prone] [AvoidDuplicateLiterals] The String literal '../' appears 5 times in this file; the first occurrence is on line 27 view
🔴 [Error Prone] [AvoidDuplicateLiterals] The String literal 'code-issue-examples' appears 5 times in this file; the first occurrence is on line 27 view
🔴 [Code Style] [UnnecessaryImport] Unnecessary import from the current package 'io.codety.scanner.analyzer.pmd.JavaPmdCodeAnalyzer' view
..ava-pmd/module_api/src/test/java/IAmNoPackage.java 🔴 [Code Style] [AvoidDollarSigns] Avoid using dollar signs in variable/method/class/interface names view
🔴 [ interfaces] [ enums and annotations must belong to a named package] All classes view
..ety/scanner/reporter/github/GithubCommentTest.java 🔴 [Code Style] [UnnecessaryImport] Unnecessary import from the current package 'io.codety.scanner.reporter.github.GithubCommentService' view
..canner/reporter/sarif/SarifResultReporterTest.java 🔴 [Code Style] [UnnecessaryImport] Unused import 'java.nio.file.Path' view
🔴 [Code Style] [UnnecessaryImport] Unused import 'io.codety.test.util.TestCaseUtil' view
..io/codety/scanner/service/AnalyzerRequestTest.java 🔴 [Error Prone] [AvoidLiteralsInIfCondition] Avoid using literals in if statements view
🔴 [Error Prone] [AvoidLiteralsInIfCondition] Avoid using literals in if statements view
..rc/test/java/io/codety/test/util/TestCaseUtil.java 🔴 [Error Prone] [AvoidLiteralsInIfCondition] Avoid using literals in if statements view

Secrets detection

File Issue
code-issue-examples/secrets/github-secret.txt 🔴 [security] [github-access-token] Detected potential exposure of sensitive information view
🔴 [security] [github-access-token] Detected potential exposure of sensitive information view
..i/src/main/java/com/SecretExposureJavaExample.java 🔴 [security] [github-access-token] Detected potential exposure of sensitive information view
🔴 [security] [github-access-token] Detected potential exposure of sensitive information view
..eporter/CodeAnalysisResultDistributionService.java 🔴 [security] [vault-token] Detected potential exposure of sensitive information view
../scanner/source/dto/GitRepoDownloadRequestDto.java 🔴 [security] [vault-token] Detected potential exposure of sensitive information view
..lyzer/codety/CodetyDefaultFactoryAnalyzerTest.java 🔴 [security] [github-access-token] Detected potential exposure of sensitive information view
..io/codety/scanner/service/dto/AnalyzerRequest.java 🔴 [security] [vault-token] Detected potential exposure of sensitive information view
🔴 [security] [vault-token] Detected potential exposure of sensitive information view
🔴 [security] [vault-token] Detected potential exposure of sensitive information view
🔴 [security] [vault-token] Detected potential exposure of sensitive information view
🔴 [security] [vault-token] Detected potential exposure of sensitive information view
🔴 [security] [vault-token] Detected potential exposure of sensitive information view
..scanner/analyzer/dto/AnalyzerConfigurationDto.java 🔴 [security] [vault-token] Detected potential exposure of sensitive information view
..scanner/reporter/dto/CodeAnalysisResultSetDto.java 🔴 [security] [vault-token] Detected potential exposure of sensitive information view
🔴 [security] [vault-token] Detected potential exposure of sensitive information view

javascript

File Issue
..resources/eslint/code-smell-examples/bad-html.html ⚪ [generic] [require-lang] Missing lang attribute in <html> tag. view
⚪ [Tag] [require-doctype] Missing <!DOCTYPE HTML> view
⚪ [generic] [indent] Expected indentation of 4 space but found no indent. view
⚪ [Tag] [require-closing-tags] Missing closing tag for div. view
⚪ [AttributeValue] [no-duplicate-id] The id '1' is duplicated. view
⚪ [AttributeValue] [no-duplicate-id] The id '1' is duplicated. view
⚪ [generic] [require-img-alt] Missing alt attribute at <img> tag view
code-issue-examples/html/bad-html.html ⚪ [generic] [require-lang] Missing lang attribute in <html> tag. view
⚪ [Tag] [require-doctype] Missing <!DOCTYPE HTML> view
⚪ [generic] [indent] Expected indentation of 4 space but found no indent. view
⚪ [Tag] [require-closing-tags] Missing closing tag for div. view
⚪ [AttributeValue] [no-duplicate-id] The id '1' is duplicated. view
⚪ [AttributeValue] [no-duplicate-id] The id '1' is duplicated. view
⚪ [generic] [require-img-alt] Missing alt attribute at <img> tag view

python

File Issue
..esources/pylint/code-smell-examples/consistency.py 🔴 [convention] [wrong-import-order] standard import "typing.Optional" should be placed before third party import "torch" view
🔴 [convention] [missing-module-docstring] Missing module docstring view
🔴 [error] [import-error] Unable to import 'torch' view
..test/resources/pylint/code-smell-examples/test1.py 🔴 [error] [undefined-variable] Undefined variable 'a2' view
🔴 [convention] [missing-module-docstring] Missing module docstring view
🔴 [convention] [invalid-name] Constant name "b3" doesn't conform to UPPER_CASE naming style view
code-issue-examples/python/bad-python-code.py 🔴 [error] [undefined-variable] Undefined variable 'a2' view
🔴 [convention] [missing-module-docstring] Missing module docstring view
🔴 [convention] [invalid-name] Module name "bad-python-code" doesn't conform to snake_case naming style view
🔴 [convention] [invalid-name] Constant name "b3" doesn't conform to UPPER_CASE naming style view
code-issue-examples/python/consistency.py 🔴 [convention] [wrong-import-order] standard import "typing.Optional" should be placed before third party import "torch" view
🔴 [convention] [missing-module-docstring] Missing module docstring view
🔴 [error] [import-error] Unable to import 'torch' view
🔴 [refactor] [duplicate-code] Similar lines in 2 files==consistency:[46:72]==consistency:[46:72] if src_weights is None: ... view

IaC

File Issue
..amples/iac/terraform/vpc-3-layer-example/alb_sg.tf 🔴 [security] [CKV_AWS_23] Ensure every security group and rule has a description view
🔴 [security] [CKV_AWS_260] Ensure no security groups allow ingress from 0.0.0.0:0 to port 80 view
..amples/iac/terraform/vpc-3-layer-example/app_sg.tf 🔴 [security] [CKV_AWS_23] Ensure every security group and rule has a description view
..-examples/iac/terraform/vpc-3-layer-example/ec2.tf 🔴 [security] [CKV_AWS_135] Ensure that EC2 is EBS optimized view
🔴 [security] [CKV_AWS_126] Ensure that detailed monitoring is enabled for EC2 instances view
🔴 [security] [CKV_AWS_8] Ensure all data stored in the Launch configuration or instance Elastic Blocks Store is securely encrypted view
🔴 [security] [CKV_AWS_79] Ensure Instance Metadata Service Version 1 is not enabled view
🔴 [security] [CKV2_AWS_41] Ensure an IAM role is attached to EC2 instance view
🔴 [security] [CKV_AWS_135] Ensure that EC2 is EBS optimized view
🔴 [security] [CKV_AWS_126] Ensure that detailed monitoring is enabled for EC2 instances view
🔴 [security] [CKV_AWS_8] Ensure all data stored in the Launch configuration or instance Elastic Blocks Store is securely encrypted view
🔴 [security] [CKV_AWS_79] Ensure Instance Metadata Service Version 1 is not enabled view
🔴 [security] [CKV2_AWS_41] Ensure an IAM role is attached to EC2 instance view
..iac/terraform/vpc-3-layer-example/load-balancer.tf 🔴 [security] [CKV_AWS_261] Ensure HTTP HTTPS Target group defines Healthcheck view
🔴 [security] [CKV_AWS_91] Ensure the ELBv2 (Application/Network) has access logging enabled view
🔴 [security] [CKV_AWS_150] Ensure that Load Balancer has deletion protection enabled view
🔴 [security] [CKV_AWS_131] Ensure that ALB drops HTTP headers view
🔴 [security] [CKV2_AWS_28] Ensure public facing ALB are protected by WAF view
..mples/iac/terraform/vpc-3-layer-example/subnets.tf 🔴 [security] [CKV_AWS_130] Ensure VPC subnets do not assign public IP by default view
🔴 [security] [CKV_AWS_130] Ensure VPC subnets do not assign public IP by default view
..amples/iac/terraform/vpc-3-layer-example/web_sg.tf 🔴 [security] [CKV_AWS_23] Ensure every security group and rule has a description view
..-examples/iac/terraform/vpc-3-layer-example/vpc.tf 🔴 [security] [CKV2_AWS_11] Ensure VPC flow logging is enabled in all VPCs view
🔴 [security] [CKV2_AWS_12] Ensure the default security group of every VPC restricts all traffic view
..s/iac/terraform/vpc-3-layer-example/nat_gateway.tf 🔴 [security] [CKV2_AWS_19] Ensure that all EIP addresses allocated to a VPC are attached to EC2 instances view
image/Dockerfile 🔴 [security] [CKV_DOCKER_2] Ensure that HEALTHCHECK instructions have been added to container images view
🔴 [security] [CKV_DOCKER_3] Ensure that a user for the container has been created view
..-examples/iac/terraform/vpc-3-layer-example/rds.tf 🔴 [security] [CKV_SECRET_6] Base64 High Entropy String view
.github/workflows/codety.yml 🔴 [security] [CKV2_GHA_1] Ensure top-level permissions are not set to write-all view

Golang

File Issue
cgo-issue.go 🔴 [general] [typecheck] : found packages mymodule (cgo-issue.go) and hello (hello.go) in view
mymodule/unused-var.go 🔴 [general] [typecheck] : # hello/mymodule mymodule/unused-var.go:7:9: u1 declared and not used mymodule/unused-var.go:8:9: u2 declared and not used view

scala

File Issue
..scanner/code-issue-examples/scala/emptyclass.scala 🔴 [generic] [HeaderMatchesChecker] Header does not match expected text view
🔴 [generic] [NewLineAtEofChecker] File must end with newline character view
🔴 [generic] [EmptyClassChecker] Redundant braces after class definition view
..odety-scanner/code-issue-examples/scala/test.scala 🔴 [generic] [HeaderMatchesChecker] Header does not match expected text view
🔴 [generic] [NewLineAtEofChecker] File must end with newline character view

@random1223 random1223 merged commit f40ac1e into main Aug 30, 2024
1 check passed
@random1223 random1223 deleted the scalastyle_add branch August 30, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant