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

CP-1070 Format: allow exclusions #81

Merged
merged 1 commit into from
Oct 15, 2015
Merged

CP-1070 Format: allow exclusions #81

merged 1 commit into from
Oct 15, 2015

Conversation

evanweible-wf
Copy link
Contributor

Issue

Changes

Source:

  • Format config now has an exclude option that takes a list of string paths (directories, files, or both)
  • If exclusions are specified, the list of files to format will be expanded manually (instead of letting dartfmt do it) and will skip any file that matches one of the given exclusion paths
  • The CLI output will include a warning that lists all files that were excluded from being formatted

Tests:

  • Integration test added to verify that an unclean file that is excluded does not get formatted

Areas of Regression

  • Format task

Testing

  • Integration tests pass
  • Play around with different values in the exclude list and verify that the files you'd expect to be excluded are indeed skipped

Code Review

@trentgrover-wf
@maxwellpeterson-wf
@dustinlessard-wf
@jayudey-wf

fyi: @aaronlademann-wf @greglittlefield-wf @clairesarsam-wf

@codecov-io
Copy link

Current coverage is 48.05%

Merging #81 into master will not affect coverage as of 09b7bc4

Powered by Codecov. Updated on successful CI builds.

@maxwellpeterson-wf
Copy link
Member

+1

@trentgrover-wf
Copy link
Contributor

+1
@jayudey-wf ready for merge

@jayudey-wf jayudey-wf changed the title Format: allow exclusions CP-1070 Format: allow exclusions Oct 15, 2015
@jayudey-wf
Copy link
Contributor

can you update the readme with this change?

@evanweible-wf
Copy link
Contributor Author

@jayudey-wf I purposely left it out of the readme because it goes against dartfmt's philosophy (see https://github.com/dart-lang/dart_style#why-cant-i-tell-the-formatter-to-ignore-a-region-of-code). There were requests for this functionality since some of our component code gets mangled, so I've included it, but I prefer that it remain a dark feature.

@jayudey-wf
Copy link
Contributor

QA Resource Approval: +10

  • Testing instruction
  • Dev +1's
  • Dev/QA +10 with detail of what was tested
    • integration test pass
    • verified that files intended to be excluded were indeed excluded and then reported on as well in the dart_dev task
  • Unit test created/updated
  • All unit tests pass

Merging into master.

jayudey-wf added a commit that referenced this pull request Oct 15, 2015
CP-1070 Format: allow exclusions
@jayudey-wf jayudey-wf merged commit b70f65a into master Oct 15, 2015
@jayudey-wf
Copy link
Contributor

@Rosie run_merge_script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants