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

Update code formatting rules #52

Merged
merged 3 commits into from Mar 8, 2020

Conversation

jackxujh
Copy link
Contributor

@jackxujh jackxujh commented Mar 7, 2020

This pull request will:

  • simplify code formatting rules
  • reintroduce line width restraint: 92 characters
  • remove retired configurations for Travis Pro and SonorCloud

@jackxujh jackxujh requested a review from alldne March 7, 2020 21:53
@jackxujh jackxujh marked this pull request as ready for review March 7, 2020 21:53
@jackxujh
Copy link
Contributor Author

jackxujh commented Mar 7, 2020

One trick in this pull request is to append # noqa E501 at the end of each line that violates the E501 rule (for being too long without line break). This will work well because all lines break this rule are in the following single file. And the module containing this file is expected to retire soon. Therefore, the updated code formatting in this pull request will activate E501 check for all files, and those outliers in this particular file will be skipped case by case.

# Examples of well structured CAN Data per sensor
TEMP_DATA = 0b1000000000010000001000000010000000000000001110000000000
ACCEL_DATA = 0b10000000001000001100000000000000001000000000000001000000000000000110000000000000001110000000000 # noqa E501
SPEED_DATA = 0b100000000011000100000000000000000010000000000000010000000000000001100000000000001000000000000000001110000000000 # noqa E501
SUSP_DATA = 0b100000000100000100000000000000000010000000000000010000000000000001100000000000001000000000000000001110000000000 # noqa E501
FUEL_DATA = 0b1000000001010000001000000010000000000000001110000000000

daisycrego pushed a commit that referenced this pull request Mar 8, 2020
@daisycrego daisycrego merged commit 6e6b461 into backend/develop Mar 8, 2020
@jackxujh jackxujh deleted the backend/feature/code-formatting branch March 8, 2020 02:11
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.

None yet

2 participants