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

chore: prettier, markdownlint, cspell and fix many typos #705

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

carlocorradini
Copy link
Contributor

@carlocorradini carlocorradini commented Sep 3, 2023

Related to PR #671

Keep in mind that this PR is purely focused to improving standards and maintainability.

What has been changed:

  • Added prettier
  • Added markdownlint
  • Added cspell
  • Added shellcheck
  • Fix spelling typos
  • Fix formatting (markdown and others)
  • Moved CoC.md to root and renamed as CODE_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

Copy link
Member

@swanandx swanandx left a 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!

Copy link
Member

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

Copy link
Contributor Author

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

Comment on lines 7 to 9
- "**.rs"
- "Cargo.*"
- "*/Cargo.*"
Copy link
Member

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

Copy link
Contributor Author

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.

- 'rumqttd-*'
push:
tags:
- "rumqttd-*"
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed (see comment above)

Copy link
Member

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 )

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@@ -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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/// Use to indicate we want to skip the data request
/// Use to indicate we want to skip the DataRequest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member

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 ?

Copy link

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

Copy link
Member

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?

Copy link
Member

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 )

Copy link
Contributor Author

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
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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!

Copy link
Contributor Author

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

Copy link
Member

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?

Copy link
Contributor Author

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 :/

Copy link

@h3nill h3nill left a 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.

Copy link

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

@carlocorradini
Copy link
Contributor Author

Sorry for the late reply but I was very very busy 😥🤯

@carlocorradini
Copy link
Contributor Author

carlocorradini commented Sep 23, 2023

@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.
What if these configuration files—markdownlint, prettier, etc.—were transferred to utils and used to inspect and fix the entire repository?

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

3 participants