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

Apply Editorconfig checking to the build #856

Merged
merged 5 commits into from
Apr 22, 2019
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
30 changes: 25 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,37 @@
# Set to false if aria repo gets one.
root = true


# Unix-style newlines with a newline ending every file
[*]
[*.{html,css,js}]
charset = "utf-8"
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{html,css,js}]
indent_style = space
indent_size = 2
block_comment_start = /*
block_comment = *
block_comment_end = */

[*.md]
charset = "utf-8"
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = false

# Ignore third party content
[{/common/**,/examples/landmarks/js/visua11y.js,/examples/landmarks/css/bootstrap.css,/examples/landmarks/css/bootstrap-accessibility.css,/examples/menubar/menubar-1/images/separator.paint}]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset

# Ignore minfied files
[*.{min.js,pack.js}]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of applying to all files, shouldn't we explicitly state which files we consider text? I get concerned about git thinking a file is text but it is binary. In the future, if someone adds a binary file, isn't aware of this, and if git makes a mistake, it could cause problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can, but this is the common file patter you'll see in other repos. If a new binary files get added, then i believe it will just try to treat it as diff'able. I think that would be same behaviour as today without this file though


# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.paint binary
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,9 @@ jobs:
- stage: Test
name: HTML Linting
script: npm run vnu-jar

- stage: Test
name: AVA Regression Tests
script: ava -c 1 test/tests
env: TEST_WAIT_TIME=1000
- stage: Test
name: Regression Tests Coverage Report
script: node test/util/report.js
env: ALLOW_FAILURE=true

name: EditorConfig Linting
script: npm run lint:ec
- stage: Deploy
if: branch = master AND type != pull_request
script: skip
Expand Down
1 change: 0 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
All documents in this Repository are licensed by contributors
under the
[W3C Software and Document License](https://www.w3.org/Consortium/Legal/copyright-software).

Loading