-
Notifications
You must be signed in to change notification settings - Fork 349
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
[Linter] Cleanup the github sources checks #200
Conversation
Code climate hates this function so I pulled it apart a little bit. Also since you can't have a gist that starts with `www.`, added a check for that as well.
@@ -377,8 +380,6 @@ def _validate_social_media_url(s) | |||
|
|||
# @!group All specs validation helpers | |||
|
|||
private |
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.
why?
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.
There is already a private label higher up in the file. I can add it back if we want it for consistencies sake.
def perform_github_uri_checks(git, git_uri) | ||
if git_uri.host.start_with?('www.') | ||
results.add_warning('github_sources', 'Github repositories should ' \ | ||
'not use `www` in their URL.') |
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.
second line of the method call should be indented 2 spaces
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.
fixed
[Linter] Cleanup the github sources checks
[Linter] Cleanup the github sources checks
Code climate hates this function so I pulled it apart a little bit. Also since you can't have a gist that starts with
www.
, added a check forthat as well. Related to #48 as this is another small improvement to the linter.