carbon-lang icon indicating copy to clipboard operation
carbon-lang copied to clipboard

Disable `google-readability-casting` as it is broken.

Open chandlerc opened this issue 1 year ago • 0 comments

I had been bothered by the confusing suggestions to replace calls to a constructor with ... calls to a constructor, claiming the original code was a C-style cast. In some code, we've worked around this by using static_cast but that really doesn't seem to be a readability win.

I did some research and from what I can tell this tidy check is deeply broken, with both Chromium and internal Google users disabling it due to widespread issues: https://chromium.googlesource.com/chromium/src/+/f828a2248f0da4e7bfadfa5db324230043aaea02

We should disable it as well for now. I've removed one NOLINT comment for it, but not tried to remove all the static_casts that are now unnecessary as that seems hard to do in any automatic way.

Replace this paragraph with a description of what this PR is changing or adding, and why.

Closes #ISSUE

chandlerc avatar May 18 '24 02:05 chandlerc