-
Notifications
You must be signed in to change notification settings - Fork 1
#[222] No info to user about invalid regex #253
Conversation
fixed html removed useless method
read error from log pass error to html
scalafmt
- fixed style-coding in html - added sealed trait for error message and change logic for it
- changes a little bit trait and case clasess
- added function and library to test regexp for validity - added error message about invalid regexp
- change first letter to capital - changed color
- scalafmt
| IO( | ||
| CSearchPage(Seq.empty[Search.PackageResult], | ||
| 0, | ||
| ErrorResponse(message.substring(0, 1).toUpperCase + message.substring(1, message.size)))) |
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.
Use .lenght instead .size on strings.
You can make a more elegant code without .substring concatination.
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.
Use .lenght instead .size on strings.
Does Scala have a linter that catches those things? (Also it's .length)
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.
@neongreen
Only IDE inspection support.

Or what did you mean?
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.
I meant a linter that we can run during CI.
I have just tried to run SonarQube on our code, but it didn't find the message.size thing :(
- added new trait for Error response - added new html for error response
# Conflicts: # core/src/main/scala/codesearch/core/search/Search.scala
- got some git problems, restore data in file
- scalafmt
|
@Kabowyad Please remove 62 row in |
- create function for creating errorResponse
- clean imports
- removed {}, because for some reasons it didn't compile
- scalafmt formating
- scalafmt formating (another one)
|
PR closed because it moved to another PR: #272 |
No description provided.