Closed ptgott closed 1 month ago
Hello @jdkato, it looks like a number of cucumber tests are failing in CI. When I set up a development environment per the instructions and run make test
on origin/v3
, cucumber tests also fail. Is this a known issue? Is there a way to verify which failures were introduced by my changes? Thanks!
The tests pass on the v3 branch on GitHub and for me locally.
So my guess is that the failures you're seeing locally on the v3 branch are related to your environment, but I would need to know which cases are failing to say more.
The failures here are related to your changes, but I haven't looked closely enough to say exactly why.
My advice would be to try running Vale in the relevant test directories, starting with testdata/fixtures/patterns
.
@jdkato Thanks for your help! I realized why my changes were introducing failures and pushed a fix with a new unit test.
The changes look good. Are you ready for this to be merged?
The changes look good. Are you ready for this to be merged?
Yes, thanks for taking a look and helping me through the process!
Allow users to specify the comment delimiters they are using in their documentation. vale replaces these with HTML comment tags before linting, making it possible to control style rules for specific passages of prose in file formats that use non-HTML comment syntax. This is critical for controlling style rules within a page in MDX, and potentially other formats as well.
This example configures the
CommentDelimiters
field for*.md
files, indicating that{/*
and*/}
are the custom comment delimiters:Internally, custom delimiters are represented as a
[2]string
, and it is only possible to configure one set of custom comment delimiters for a given format block.More specific changes:
applyPatterns
. Remove the method receiver and take only the necessary fields of*core.Config
as parameters. This makes it easier to testapplyPatterns
without mocking an entire*core.Config
. Also extract functions forapplyInlinePatterns
andapplyBlockPatterns
so we can use fewer arguments in a single function.applyCommentPatterns
, which works similarly toapplyInlinePatterns
andapplyBlockPatterns
, but for substituting comments.https//github.com/stretchr/testify/assert
, a popular testing library, to get richer test output.Closes #762