Skip to content

Add Travis test to make sure text files are UTF-8 encoded #14701

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

Merged
merged 2 commits into from
Jun 2, 2021
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
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ matrix:
false;
fi

- <<: *basic-vm
name: "UTF-8 Check"
script:
# Make sure we're not introducing any text which is not UTF-8 encoded
- git diff $TRAVIS_BRANCH...HEAD -U0 | ( grep -a '^+' || true ) | ( ! grep -axv '.*' )
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this check still valid or should we run file -I <filename> and check the encoding is one of the handful of acceptable options (at least ascii, and utf-8)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what I've read, file -I doesn't check the whole file and is therefore not always correct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Patater hopefully 15c9474 addresses your comment


- <<: *basic-vm
name: "include check"
env: NAME=include_check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ extern "C" {
* PrWriteListSize
* NOTE: This parameter is ignored by the CPU2 when the parameter "Options" is set to "LL_only" ( see Options description in that structure )
*
* Maximum number of supported prepare write request
* Maximum number of supported “prepare write request”
Copy link
Contributor

Choose a reason for hiding this comment

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

@ARMmbed/team-st-mcd Please forward this change upstream

* - Min value: given by the macro DEFAULT_PREP_WRITE_LIST_SIZE
* - Max value: a value higher than the minimum required can be specified, but it is not recommended
*/
Expand Down Expand Up @@ -502,7 +502,7 @@ extern "C" {
* MaxConnEventLength
* This parameter determines the maximum duration of a slave connection event. When this duration is reached the slave closes
* the current connections event (whatever is the CE_length parameter specified by the master in HCI_CREATE_CONNECTION HCI command),
* expressed in units of 625/256 �s (~2.44 �s)
* expressed in units of 625/256 µs (~2.44 µs)
* - Min value: 0 (if 0 is specified, the master and slave perform only a single TX-RX exchange per connection event)
* - Max value: 1638400 (4000 ms). A higher value can be specified (max 0xFFFFFFFF) but results in a maximum connection time
* of 4000 ms as specified. In this case the parameter is not applied, and the predicted CE length calculated on slave is not shortened
Expand All @@ -511,7 +511,7 @@ extern "C" {

/**
* HsStartupTime
* Startup time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 �s (~2.44 �s).
* Startup time of the high speed (16 or 32 MHz) crystal oscillator in units of 625/256 µs (~2.44 µs).
* - Min value: 0
* - Max value: 820 (~2 ms). A higher value can be specified, but the value that implemented in stack is forced to ~2 ms
*/
Expand Down