Skip to content

Clang-format style parameter is not used correctly #1267

@bh-tt

Description

@bh-tt

If you are submitting a bug, please include the following:

  • summary of problem
  • gradle or maven version
  • spotless version
  • operating system and version
  • copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
  • copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace

If you're just submitting a feature request or question, no need for the above.

Summary

Since gradle plugin version 6.9.0 running clang-format (version 11.0.1-2, style chromium, no other configuration) formats files very differently.

Gradle version: 7.4.2
spotless version: gradle 6.9.0, likely affects maven 2.24.0 as well
OS: Linux 5.10.0-16-amd64 amd64, debian 11

Problem is likely some array mangling in #1257 (which I authored). The array created may have equal size to the list instead of being 1 larger as per the docs. Then the next line replaces the --style=<style> parameter with the filename.

I'll do some debugging to find if that is actually the cause and try to push a PR this week.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions