Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linting tool for dt files #18

Open
aparcar opened this issue Jul 31, 2019 · 4 comments
Open

linting tool for dt files #18

aparcar opened this issue Jul 31, 2019 · 4 comments

Comments

@aparcar
Copy link

aparcar commented Jul 31, 2019

Hi, at OpenWrt there are sometimes badly styled DT files which waste human time to comment and fix, it would be nice to have some automatic checks for that. Is there a tool like astyle or clang-format for device tree files?

@robherring
Copy link
Member

I don't think any such thing exists for .dts files. Something like that should probably live within dtc, not this project, as it could re-use the parsing logic.

We need something too now for DT schema files. There's tools/yaml-format in this repo that mainly just does a round trip thru ruamel, but it doesn't quite format how I'd like it to. There's also yamllint, but I haven't looked at it.

@aparcar
Copy link
Author

aparcar commented Jul 31, 2019

With dtc I'm sure you refer to this tool right? It supports dts as an output, however not linting. At OpenWrt many dts files contain comments, so converting back and forth for linting isn't feasible.

However, should I close this issue and reopen it at dtc?

@robherring
Copy link
Member

That's a mirror. The "official" repo is: https://git.kernel.org/pub/scm/utils/dtc/dtc.git

I didn't say dtc supported linting. It can output .dts files, but you loose a lot more than comments.

I don't mind leaving the issue open here to track it. There's no issue tracking for dtc. You might want to raise the issue on [email protected] list.

@aparcar
Copy link
Author

aparcar commented Jul 31, 2019

Thanks, I sent a mail asking the same question. I'll update this issue once something happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants