Skip to content
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

Add parenthesis to function def with arguments. #7858

Merged
merged 1 commit into from Oct 3, 2014

Conversation

4 participants
@cirosantilli
Copy link
Contributor

commented Sep 25, 2014

find . -iname '*.rb' | xargs perl -lapi -e 's/\bdef ([^ (]+)[ ]+([^(].*)/def $1($2)/'
@TeatroIO

This comment has been minimized.

Copy link

commented Sep 25, 2014

I've prepared a stage. Click to open.

@@ -15,11 +15,11 @@ def build_resource(hash=nil)
super
end

def after_sign_up_path_for resource
def after_sign_up_path_for(resource)

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Sep 25, 2014

Unused method argument - resource. If it's necessary, use _ or _resource as an argument name to indicate that it won't be used. You can also write as after_sign_up_path_for(*) if you want the method to accept any arguments but don't care about them.

new_user_session_path
end

def after_inactive_sign_up_path_for resource
def after_inactive_sign_up_path_for(resource)

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Sep 25, 2014

Unused method argument - resource. If it's necessary, use _ or _resource as an argument name to indicate that it won't be used. You can also write as after_inactive_sign_up_path_for(*) if you want the method to accept any arguments but don't care about them.

@@ -80,7 +80,7 @@ def tree_breadcrumbs(tree, max_links = 2)
end
end

def up_dir_path tree
def up_dir_path(tree)

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Sep 25, 2014

Unused method argument - tree. If it's necessary, use _ or _tree as an argument name to indicate that it won't be used. You can also write as up_dir_path(*) if you want the method to accept any arguments but don't care about them.

@@ -184,7 +184,7 @@ def project_admin_rules
]
end

def group_abilities user, group
def group_abilities(user, group)

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Sep 25, 2014

Perceived complexity for group_abilities is too high. [9/7]

ref =~ /refs\/heads/
end

def is_default_branch? ref
def is_default_branch?(ref)

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Sep 25, 2014

Rename is_default_branch? to default_branch?.

@@ -5,7 +5,7 @@ class << self
START = "#!idiff-start!#"
FINISH = "#!idiff-finish!#"

def processing diff_arr
def processing(diff_arr)

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Sep 25, 2014

Perceived complexity for processing is too high. [9/7]

@Razer6

This comment has been minimized.

Copy link
Member

commented Sep 25, 2014

@cirosantilli Should we also state this in the contributing guide?

@cirosantilli

This comment has been minimized.

Copy link
Contributor Author

commented Sep 26, 2014

I think not: it's already on the style guide we follow and hound should bark.

ref =~ /refs\/heads/
end

def is_default_branch? ref
def is_default_branch?(ref)

This comment has been minimized.

Copy link
@houndci-bot

houndci-bot Oct 1, 2014

Rename is_default_branch? to default_branch?.

@cirosantilli cirosantilli force-pushed the cirosantilli:def-param-paren branch from db36645 to 6ec9e68 Oct 1, 2014

@Razer6

This comment has been minimized.

Copy link
Member

commented Oct 3, 2014

@cirosantilli Can you rebase to make it mergable?

@Razer6 Razer6 added this to the 7.4 milestone Oct 3, 2014

@cirosantilli cirosantilli force-pushed the cirosantilli:def-param-paren branch from 6ec9e68 to 2e9f5de Oct 3, 2014

@cirosantilli

This comment has been minimized.

Copy link
Contributor Author

commented Oct 3, 2014

Done!

Razer6 added a commit that referenced this pull request Oct 3, 2014

Merge pull request #7858 from cirosantilli/def-param-paren
Add parenthesis to function def with arguments.

@Razer6 Razer6 merged commit 9f45e22 into gitlabhq:master Oct 3, 2014

1 check passed

default The build passed on Semaphore.
Details

@cirosantilli cirosantilli deleted the cirosantilli:def-param-paren branch Oct 3, 2014

tigefa4u pushed a commit to tigefa4u/gitlabhq that referenced this pull request Nov 6, 2018

Merge branch '7858-geo-stale-docs-on-frequency-of-geo-replication-doc…
…s' into 'master'

Geo: Stale docs on frequency of Geo replication

Closes gitlabhq#7858

See merge request gitlab-org/gitlab-ee!8061
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.