-
Notifications
You must be signed in to change notification settings - Fork 227
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
chore: prettier, markdownlint, cspell and fix many typos #705
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thank you for the PR! There were too many typos haha. I have few doubts / suggestions which I am writing here ( and in review comments ):
.npmrc
,prettter
etc. aren't required, only part we use JS is utils, which again, isn't used that frequently, so no need for this. ( same goes fo shellcheck )- and due to above mentioned comment, we don't need to move
package.json
outside utils - Indentation in markdown files is too much. Also do we really need those markdownlints? ( will review MD files later )
- csspell is something nice to have for personal use, if we have it in CI, it will fail runs sometimes when not required and the words we have to ignore in it will just keep increasing.
IMHO, as the repo is mostly ( i wish to say completely ) only Rust files, we don't need lints/formatter for others, We are pretty much consistent over the indentation already right? Primary focus must be how maintainable our code is and how easy new users can contribute.
PS: This are just comments, so please feel free to discuss them!
.github/PULL_REQUEST_TEMPLATE.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
existing file feels more grammatically correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GitHub Issue Template should be updated to reflect the new specification (see this): From md
to yaml
.github/workflows/build.yml
Outdated
- "**.rs" | ||
- "Cargo.*" | ||
- "*/Cargo.*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are not escaping any special characters, '
should be fine. NOTE: '
and "
are differently processed by YAML
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed! Prettier
is highly customizable. Now, '
and not "
must be used in all yml
and yaml
files.
.github/workflows/release.yml
Outdated
- 'rumqttd-*' | ||
push: | ||
tags: | ||
- "rumqttd-*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same reason mentioned in previous comment, '
is good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed (see comment above)
.github/workflows/main.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existing indentation is more readable, also as it is consistent in all yaml files, I don't see the need to this excess indentation ( same applies to other YAML files )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want I can change the configuration from 4
to 2
spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As always for YAML files only
rumqttd/src/router/routing.rs
Outdated
@@ -1394,7 +1394,7 @@ enum ConsumeStatus { | |||
FilterCaughtup, | |||
/// Some publishes on topic have been forwarded | |||
PartialRead, | |||
/// Use to indicate we want to skip the datareqest | |||
/// Use to indicate we want to skip the data request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Use to indicate we want to skip the data request | |
/// Use to indicate we want to skip the DataRequest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
rumqttd/.gitignore
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it safe to remove this @henil ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't see a reason to remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any reason to keep it though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to ask do we need stage/
in .gitignore
here? or shall we keep it empty ( if we want to keep it )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To assist users and contributors, if this .gitignore
is required, please include a note
LICENSE
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generated by GITHUB, why change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For accuracy and correctness, I only removed the last slash from the URL. Nothing special
benchmarks/results/benchmarks.html
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is automatically generated by plot.go
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, but since it's in the repository, it's been formatted similarly to the other files. Nothing special
benchmarks/README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as rel="import"
is deprecated, is there any other way we can embed the benchmark results html file in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not possible :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @swanandx comment here, fixing typos is fine but we don't need spellchecker ad other js related things.
rumqttd/.gitignore
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't see a reason to remove it
Sorry for the late reply but I was very very busy 😥🤯 |
@swanandx @henil Although I completely agree with you, these technologies and tools are almost necessary to maintain an effective and standardized repository structure and code. |
Related to PR #671
Keep in mind that this PR is purely focused to improving standards and maintainability.
What has been changed:
prettier
markdownlint
cspell
shellcheck
CoC.md
to root and renamed asCODE_OF_CONDUCT.md
(standard and better for new contributors)Scripts:
npm run check
Check for errors
npm run fix
Fix errors (if possible)
When the GitHub workflows are modified,
npm run check
has to be added