10000 Make format command by LasTshaMAN · Pull Request #153 · securesecrets/shade · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make format command #153

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 4 commits into from
Dec 30, 2021
Merged

Conversation

LasTshaMAN
Copy link
Contributor

This PR:

  • cleans up some artifacts left from SN smart contract generator
  • introduces make format to apply a common set of formatting rules across all Shade repo (along with rustfmt.toml configuration file for it)

makefile Outdated

format:
cargo fmt
cargo fix --allow-dirty --allow-staged
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not 100% sure about --allow-dirty --allow-staged flags, they seem useful to run before committing (this is how I usually use go fmt),

could these break my code in unexpected ways ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does that basically mean that it will perform formatting on staged changes as well as unstaged changes (dirty)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just a suggestion but I'd keep the format task just to formatting.

With cargo fix its generally good practice to do this within its own commit so the changes can be easily rolled back if they break something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have read some more about cargo fix, you are right,

since it does more than simple code formatting it is better to run it separately from make format, removed it (leaving it up to developer to apply, if he wishes)

@FloppyDisck FloppyDisck merged commit 65bc61e into securesecrets:dev Dec 30, 2021
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.

4 participants
0