Closed
Bug 1392012
Opened 7 years ago
Closed 7 years ago
./mach clang-format with git doesn't use .clang-format-ignore to ignore some files & dirs
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Developer Infrastructure
Source Code Analysis
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: dex, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [good first bug][lang=python])
Attachments
(1 file)
Comment 1•7 years ago
|
||
Hello, I'm new around here. From what I understood, the format that clang-format uses to ignore files is different for mercurial and git. I was referring to https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format and found that git has a different option called 'ignored' that does the same function as .clang-format-ignored. Usage would be: git clang-format ignored dir So I think we should change line 272 from: diff_process = Popen(["git", "diff", "--no-color", "-U0", "HEAD","--","*.c","*.cpp","*.h"], stdout=PIPE) to: diff_process = Popen(["git", "diff", "--no-color", "-U0", "HEAD","--","*.c","*.cpp","*.h", "clang-format", "ignored", "dir"], stdout=PIPE) I don't know how I should mention the directory/file to be ignored. Help would be appreciated. Please assign this bug to me if I have understood the problem correctly.
Flags: needinfo?(sledru)
Reporter | ||
Comment 2•7 years ago
|
||
did you test your change in the code? Thanks
Flags: needinfo?(sledru)
Comment 3•7 years ago
|
||
Not yet. I am going to proceed with running "./mach clang-format" on this git repo https://github.com/mozilla/gecko-dev.git and then going to try to fix any errors that may occur. Do you know which command I should use to specifically trigger the bug? Thanks!
Flags: needinfo?(sledru)
Reporter | ||
Comment 4•7 years ago
|
||
You should look for this yourself. This is part of the learning phase!
Flags: needinfo?(sledru)
Comment hidden (mozreview-request) |
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → dex
Reporter | ||
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8900921 [details] Bug 1392012 - ./clang-format with git should exclude files from .clang-format-ignore https://reviewboard.mozilla.org/r/172358/#review178456 once more, great work, thanks
Attachment #8900921 -
Flags: review?(sledru) → review+
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/371686fcf5e0 /clang-format with git should exclude files from .clang-format-ignore r=sylvestre
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/371686fcf5e0
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•6 years ago
|
Product: Core → Firefox Build System
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•