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

Fix hash.sw, replaced #![foo] for #[foo] #5248

Merged
merged 2 commits into from
Nov 1, 2023
Merged

Conversation

cr-fuel
Copy link
Contributor

@cr-fuel cr-fuel commented Nov 1, 2023

Description

Fixes #5059

While doing this I also updated forc-fmt to have a better error message being printed to the stdout

Before:

error: Formatting skipped due to error.
error: Failed to compile /Users/cr-fuel/projects/fuel/sway/sway-lib-std/src/hash.sw

Now:

error: Formatting skipped due to error.
error: Failed to compile /Users/cr-fuel/projects/fuel/sway/sway-lib-std/src/hash.sw
Cannot format raw hashbang attribute,
If this is intended to be a doc comment try using the `//!` syntax instead

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

While doing this I also updated `forc-fmt` to have a better error
message being printed to the stdout

Before:

```bash
error: Formatting skipped due to error.
error: Failed to compile /Users/cr-fuel/projects/fuel/sway/sway-lib-std/src/hash.sw
```

Now:

```bash
error: Formatting skipped due to error.
error: Failed to compile /Users/cr-fuel/projects/fuel/sway/sway-lib-std/src/hash.sw
Cannot format raw hashbang attribute,
If this is intended to be a doc comment try using the `//!` syntax instead
```
@cr-fuel cr-fuel requested a review from a team November 1, 2023 17:27
@cr-fuel cr-fuel self-assigned this Nov 1, 2023
@cr-fuel cr-fuel changed the title Fix hash.sw, replaced #![foo] for #[foo]` Fix hash.sw, replaced #![foo] for #[foo] Nov 1, 2023
@cr-fuel cr-fuel enabled auto-merge (squash) November 1, 2023 17:29
@cr-fuel cr-fuel merged commit d1bc49d into master Nov 1, 2023
31 checks passed
@cr-fuel cr-fuel deleted the fix-formatting-fatal-errors branch November 1, 2023 23:39
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.

Formatter error in sway-lib-std/src/hash.sw
4 participants