Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

atlassian/crate-ci-typos-check errors aren't formatted correctly

Mike Manger October 21, 2024

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

 

1 answer

1 accepted

1 vote
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 22, 2024

Hi Mike,

I've reached out to our pipes team to see if they can provide further assistance.

Cheers!

- Ben (Bitbucket Cloud Support)

Mike Manger November 4, 2024

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")

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 4, 2024

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)

 

Like Mike Manger likes this
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 1, 2024

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)

Mike Manger December 2, 2024

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.

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 3, 2024

Hi Mike,

Thanks for the update - I've shared this with the team for further investigation.

Cheers!

- Ben (Bitbucket Cloud Support)

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 11, 2024

Hi @Mike Manger 

Our developers have made further changes, can you check this again please? :) 

Cheers!

- Ben (Bitbucket Cloud Support)

Mike Manger December 12, 2024

Great working now, thanks all!

[REDACTED]

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 12, 2024

No worries @Mike Manger ! Thank you for your patience! :D 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events