I'm trying to add the atlassian/crate-ci-typos-check pipe to some projects.
In some projects it is running fine however I am getting the following
https://i.imgur.com/CDXdI7j.png
(I'd insert the code or upload an image here but apparently that doesn't work?!).
The error report doesn't appear to be structured in a readable way.
This is the code it is getting stuck on:
@font-face {
font-family: 'beic-icons';
src: url('fonts/beic-icons.woff2') format('woff2'),
url('fonts/beic-icons.woff') format('woff'),
url('fonts/beic-icons.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
Running the typos library locally doesn't report an error which makes me wonder if this is a bug with the pipe itself. I can't see anything apparently wrong with the code, note it isn't get stuck on the line above?!
I've found the same issue in other projects but not all of them.
This is an example pipeline config:
image: node:lts
pipelines:
default:
- parallel:
- step:
name: Typos
script:
- pipe: atlassian/crate-ci-typos-check:1.2.4
- step:
name: Test
caches:
- node
script:
- # etc
Hi Mike,
I've reached out to our pipes team to see if they can provide further assistance.
Cheers!
- Ben (Bitbucket Cloud Support)
Thanks Ben.
If it helps it appears this issue is caused by binary files in the repository. The pipe's TypoResult class seems to be getting initialised without the required byte_offset, typo or corrections arguments.
I don't seem to be able to work around this via the tool's config file either (e.g. adding "check-filename = false")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mike Manger
Thank you for your patience. Our pipes development team have taken a look into this upon my request and it seems like there's an unexpected output format which the tool is unable to handle. An internal bug ticket has been raised for this team to fix this.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Mike Manger !
My colleague in our development team has patched this issue, could you please test on your end and let me know if you run into any issues?
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ben, thanks for looking into this.
I've tested and whilst the errors are displaying better, we're still getting errors when binary files are found in the repository. This is not happening when I run the typos CLI tool locally!
To help demonstrate this I've added a simple image titled 'test.png' to the test-typos branch in this public repository:
I would suggest adding something similar to the unit tests for the pipe.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mike,
Thanks for the update - I've shared this with the team for further investigation.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mike Manger
Our developers have made further changes, can you check this again please? :)
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries @Mike Manger ! Thank you for your patience! :D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.