Skip to content

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