Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Reasonable and intuitive line counting (proposed fix for #468) #469

Merged
merged 4 commits into from
Jul 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/maxFuncBodyLengthRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class MaxFunctionBodyLengthRuleWalker extends Lint.RuleWalker {
const sourceFile: ts.SourceFile = this.getSourceFile();
const startLine: number = sourceFile.getLineAndCharacterOfPosition(node.body.pos).line;
const endLine: number = sourceFile.getLineAndCharacterOfPosition(node.body.end).line;
return endLine - startLine;
return endLine - startLine + 1;
}

private calcBodyCommentLength(node: ts.FunctionLikeDeclaration) {
Expand Down
Loading