Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

prefer-function-over-method should ignore abstract methods #2307

Merged
merged 2 commits into from
Mar 7, 2017
Merged

prefer-function-over-method should ignore abstract methods #2307

merged 2 commits into from
Mar 7, 2017

Conversation

sbj42
Copy link
Contributor

@sbj42 sbj42 commented Mar 7, 2017

PR checklist

Overview of change:

The prefer-function-over-method rule was warning for abstract methods. This change adds a test case for that, and resolves it. The rule already checks for the static modifier, so it was simple enough to also check for the abstract modifier.

CHANGELOG.md entry:

[bugfix] prefer-function-over-method now ignores abstract methods

`prefer-function-over-method` should ignore abstract methods.  In this commit, the new test case fails.
Abstract methods have no body, and never use `this`, so the `prefer-function-over-method` rule should not apply to them.
@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @sbj42! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@nchen63
Copy link
Contributor

nchen63 commented Mar 7, 2017

@sbj42 thanks!

@nchen63 nchen63 merged commit 5661bfb into palantir:master Mar 7, 2017
@sbj42 sbj42 deleted the issue2305 branch March 7, 2017 02:16
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