-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Rule/#10/lowercase and Rule/#13/hyphens Former-commit-id: cc839fb99cf47229aad7e59205544934a3211421 [formerly 380c5a2] Former-commit-id: 4b4e840ca878af4888a9eea404be310af3f1575e Former-commit-id: 77647d512bcf7466d76eb050ff59bcbda0d647e2
- Loading branch information
Showing
18 changed files
with
7,864 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.vscode | ||
.gradle | ||
.idea | ||
./rest-studentproject/bin |
51 changes: 51 additions & 0 deletions
51
docs/Rules/static/Hyphens-(-)-should-be-used-to-improve-the-readability-of-URIs.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Lowercase letters should be preferred in URI paths | ||
|
||
## Category | ||
|
||
URIs | ||
|
||
## Importance, severity, difficulty | ||
|
||
* Importance: high | ||
* Severity: error | ||
* Difficulty to implement the rule: easy | ||
|
||
## Quality Attribute | ||
|
||
* Maintainability | ||
|
||
## Rule Description | ||
|
||
Description from Massé [1]. | ||
|
||
To make your URIs easy for people to scan and interpret, use the hyphen (-) character | ||
to improve the readability of names in long path segments. Anywhere you would use | ||
a space or hyphen in English, you should use a hyphen in a URI. | ||
|
||
## Implemented | ||
|
||
* Yes | ||
|
||
## Implementation Details (Issue #13) | ||
|
||
* Static implementation | ||
* Check if a path segment can be reduced to more than one word. If yes and the path segment does not contain (-) hyphens, there is a violation | ||
* Give the hint to use hyphens to separate words in a path segment | ||
|
||
### What is checked: | ||
* extract path segments from path using "/" as delimiter | ||
* based on an English dictionary, the extracted path is checked for substrings. If one or more substrings are found, there is a violation of the rule | ||
* pathSegment can be camelCase, kebabCase, snakeCase, all lowercase, all uppercase, or just a mixture of these | ||
|
||
### What is not checked: | ||
* presence of invalid delimiters | ||
* check of dynamic parameters | ||
|
||
### Future work | ||
|
||
* None | ||
|
||
|
||
## Source | ||
|
||
[1] https://www.oreilly.com/library/view/rest-api-design/9781449317904/ |
49 changes: 49 additions & 0 deletions
49
docs/Rules/static/Lowercase-letters-should-be-preferred-in-URI-paths.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Lowercase letters should be preferred in URI paths | ||
|
||
## Category | ||
|
||
URIs | ||
|
||
## Importance, severity, difficulty | ||
|
||
* Importance: high | ||
* Severity: error | ||
* Difficulty to implement the rule: easy | ||
|
||
## Quality Attribute | ||
|
||
* Maintainability | ||
|
||
## Rule Description | ||
|
||
Description from Massé [1]. | ||
|
||
When convenient, lowercase letters are preferred in URI paths since capital letters can | ||
sometimes cause problems. RFC 3986 defines URIs as case-sensitive except for the | ||
scheme and host components. | ||
|
||
## Implemented | ||
|
||
* Yes | ||
|
||
## Implementation Details (Issue #10) | ||
|
||
* Static implementation | ||
* Check path if it contains an uppercase letter, if so give a warning | ||
* Give the hint to use lowercase letters instead of uppercase | ||
|
||
### What is checked: | ||
* check if the path contains an uppercase letter | ||
* check if the path is empty or there are no paths | ||
|
||
### What is not checked: | ||
* presence of invalid delimiters | ||
* check of dynamic parameters | ||
|
||
### Future work | ||
|
||
* None | ||
|
||
## Source | ||
|
||
[1] https://www.oreilly.com/library/view/rest-api-design/9781449317904/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...-studentproject/src/main/java/rest/studentproject/docs/wordninja_words.txt.REMOVED.git-id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8fd15e2358d7c283be8e0b9a3ba9b9f1b677bcfb |
Oops, something went wrong.