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

Removed comments + added line highlight at position of keyword #268

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexcojocaru2002
Copy link
Contributor

@alexcojocaru2002 alexcojocaru2002 commented Sep 19, 2023

Closes #213

The aim of this Pull Request is to improve the SourceCodeSecurityCheckStep class.

  • Change name of the class
  • Remove comments when checking code
  • When having an error highlight the corresponding line and not line 1.

@alexcojocaru2002
Copy link
Contributor Author

@martinmladenov How should I rename the class ? Also should I write a separate test for removeComments method ?

return false;
String[] lines = code.split("\\n");
// Split lines and search every line for keyword
for (int lineNumber = 0; lineNumber < lines.length; lineNumber++)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we have a test showing what this should do? :)

@martinmladenov
Copy link
Collaborator

@alexcojocaru2002

@martinmladenov How should I rename the class ? Also should I write a separate test for removeComments method ?

Good question, I haven't thought about that. Maybe something like "SourceCodeCheckStep" would be suitable (but this could be misleading as people might think it has to do with code checks). If you think of anything more suitable, feel free to use that instead. @mauricioaniche Do you have any ideas?

@mauricioaniche
Copy link
Contributor

SourceCodeCheckStep looks good to me!

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.

Improve SourceCodeSecurityCheckStep
3 participants