Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

#[222] No info to user about invalid regex #253

Closed
wants to merge 17 commits into from
Closed

Conversation

Kabowyad
Copy link
Contributor

@Kabowyad Kabowyad commented Apr 4, 2019

No description provided.

Kabowyad added 3 commits April 4, 2019 21:31
fixed html
removed useless method
read error from log
pass error to html
scalafmt
@Kabowyad Kabowyad changed the title Issue 222 #[222] No info to user about invalid regex Apr 9, 2019
Kabowyad added 5 commits April 9, 2019 21:11
- 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))))
Copy link
Contributor

@kamilongus kamilongus May 4, 2019

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.

Copy link
Member

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)

Copy link
Contributor

@kamilongus kamilongus May 4, 2019

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.
image
Or what did you mean?

Copy link
Member

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 :(

Kabowyad added 5 commits June 3, 2019 23:30
- added new trait for Error response
- added new html for error response
# Conflicts:
#	core/src/main/scala/codesearch/core/search/Search.scala
This reverts commit 61bc938, reversing
changes made to 43ea7c1.
- got some git problems, restore data in file
- scalafmt
@kamilongus
Copy link
Contributor

@Kabowyad Please remove 62 row in Search#csearch - now it breaks the search.

Kabowyad added 3 commits June 30, 2019 00:10
- create function for creating errorResponse
- clean imports
- removed {}, because for some reasons it didn't compile
- scalafmt formating
- scalafmt formating (another one)
@kamilongus
Copy link
Contributor

PR closed because it moved to another PR: #272

@kamilongus kamilongus closed this Jul 7, 2019
@neongreen neongreen deleted the issue-222 branch July 17, 2019 11:44
@Evengining Evengining restored the issue-222 branch July 29, 2019 07:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants