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

Removes trailing whitespace from file-header #3802

Merged
merged 1 commit into from
Apr 2, 2018

Conversation

cwgorman
Copy link
Contributor

@cwgorman cwgorman commented Mar 29, 2018

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

The rule file-header does not play nice with no-trailing-whitespace if the file header includes blank lines. For example, after applying file-header with --fix, you might end up with something like this:

/* 
 * Copyright My Company 2018
 * 
 * Project Identifier
 * 
 * All Rights Reserved, blah blah blah legal stuff.
 */

Note the trailing whitespace on the * lines. This means you would have to run tslint --fix twice to get the desired result.

This PR adds a simple solution of right-trimming each line of the file header.

Is there anything you'd like reviewers to focus on?

CHANGELOG.md entry:

[bugfix] Makes rule file-header play nice with rule no-trailing-whitespace

@palantirtech
Copy link
Member

Thanks for your interest in palantir/tslint, @cwgorman! 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.

@cwgorman cwgorman force-pushed the file-header-whitespace branch 2 times, most recently from 862c93b to 54a187e Compare March 29, 2018 15:49
Copy link
Contributor

@suchanlee suchanlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cwgorman!

@suchanlee suchanlee merged commit 01cf478 into palantir:master Apr 2, 2018
HyphnKnight pushed a commit to HyphnKnight/tslint that referenced this pull request Apr 9, 2018
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