Skip to content

Conversation

bllchmbrs
Copy link
Contributor

Change Summary

This adds in the base Hyperlint configurations and shows where to add files to effectively configure your style guide and rules.

Related issue number

NA

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • [-] Unit tests for the changes exist
  • [-] Tests pass on CI
  • [-] Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Please review @sydney-runkle

Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

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

style_guide_test.md review details

Line Edit Problems/Proposals

Note: The following 3 comments are grouped by line.

Line 3

Existing text:

# This ia a test file

Issues:

  • Style Guide - (Spelling-error) Did you really mean 'ia'?

Line 5

Existing text:

it will flag errors like on pydantic.

Issues:

  • Style Guide - (Terms-error) Use 'Pydantic' instead of 'pydantic'.

Line 11

Existing text:

This is is an issue.

Issues:

  • Style Guide - (Repetition-error) 'is' is repeated!
  • Style Guide - (hyperlint.repeatedWords-error) 'is' is repeated, did you mean to repeat this word?

@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Aug 29, 2024
@@ -0,0 +1,11 @@

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file will run the checks (but no recommendations) use it to iterate on the styles / dictionary. It doesn't need to be committed to the repo (but can be).

@@ -0,0 +1,7 @@
StylesPath = styles
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the base style guide check cconfiguration, no action needed here on your part - this won't change much or often.

@@ -0,0 +1,12 @@
validator
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is your custom dictionary: Read more here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great! I'll expand on this when I do some docs updates tomorrow.

@@ -0,0 +1,6 @@
extends: repetition
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a custom rule, lots of possibilities here but best to start simple. Read more here

@bllchmbrs
Copy link
Contributor Author

bllchmbrs commented Aug 29, 2024

style_guide_test.md review details

Line Edit Problems/Proposals

Note: The following 3 comments are grouped by line.

Line 3

Existing text:

This ia a test file

Issues:

  • Style Guide - (Spelling-error) Did you really mean 'ia'?

Line 5

Existing text:

it will flag errors like on pydantic.
Issues:

  • Style Guide - (Terms-error) Use 'Pydantic' instead of 'pydantic'.

Line 11

Existing text:

This is is an issue.
Issues:

  • Style Guide - (Repetition-error) 'is' is repeated!
  • Style Guide - (hyperlint.repeatedWords-error) 'is' is repeated, did you mean to repeat this word?

As you make changes, you'll get more comments like this. If the style guide test file is present on a pull request, then it will post a comment like that on every update.

Copy link

codspeed-hq bot commented Aug 29, 2024

CodSpeed Performance Report

Merging #10270 will not alter performance

Comparing bllchmbrs:main (5b7ce5c) with main (e6145c0)

Summary

✅ 34 untouched benchmarks

Copy link
Contributor

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

Looks great - left some comments attempting to fix linting issues.

Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

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

style_guide_test.md review details

Line Edit Problems/Proposals

Note: The following 3 comments are grouped by line.

Line 3

Existing text:

# This ia a test file

Issues:

  • Style Guide - (Spelling-error) Did you really mean 'ia'?

Line 5

Existing text:

it will flag errors like on pydantic.

Issues:

  • Style Guide - (Terms-error) Use 'Pydantic' instead of 'pydantic'.

Line 11

Existing text:

This is is an issue.

Issues:

  • Style Guide - (hyperlint.repeatedWords-error) 'is' is repeated, did you mean to repeat this word?
  • Style Guide - (Repetition-error) 'is' is repeated!

@sydney-runkle
Copy link
Contributor

cc @Viicos, this could be a great way to enforce Pydantic and pydantic across the docs :)

@sydney-runkle sydney-runkle enabled auto-merge (squash) August 30, 2024 00:42
@sydney-runkle sydney-runkle added documentation and removed relnotes-fix Used for bugfixes. labels Aug 30, 2024
@sydney-runkle sydney-runkle merged commit 111eb01 into pydantic:main Aug 30, 2024
58 checks passed
Copy link
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

AdolfoVillalobos pushed a commit to AdolfoVillalobos/pydantic that referenced this pull request Aug 30, 2024
…ic#10270)

Co-authored-by: bllchmbrs <bill@hyperlint.com>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants