Bug 123936 - Find files to be formatted with clang-format
Summary: Find files to be formatted with clang-format
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyBeginner, easyHack, skillPython, skillScript, topicCleanup
Depends on:
Blocks:
 
Reported: 2019-03-08 07:30 UTC by Samuel Mehrbrodt (CIB)
Modified: 2019-07-11 07:41 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Mehrbrodt (CIB) 2019-03-08 07:30:57 UTC
We use clang-format to have consistent formatting on a number of files already. Although most files are currently blacklisted for formatting by 'solenv/clang-format/blacklist'.

The task is to find files where enabling clang-format would only cause minor reformatting (maybe less than 5% of the lines on a file).

Then this file should be removed from 'solenv/clang-format/blacklist' and be formatted with clang-format.

Ideally a (Python/Shell/...) script will be written which does this check for all files. But manually checking is also ok.

Please submit suitable files one by one to Gerrit to allow individual review.
Comment 1 Raghu Ram 2019-03-08 12:59:54 UTC
Hello, I would like to work on it, can I get some code pointers, as I am new to open source contribution but have a fair amount of interest towards contributing to this project and work on this issue.

should I lear
Comment 2 Raghu Ram 2019-03-08 13:04:29 UTC
should I get familiar with any other languages as I already have knowledge of python which is mentioned in keywords?
Comment 3 Samuel Mehrbrodt (CIB) 2019-03-08 13:52:26 UTC
(In reply to Raghu Ram from comment #1)
> Hello, I would like to work on it, can I get some code pointers, as I am new
> to open source contribution but have a fair amount of interest towards
> contributing to this project and work on this issue.
> 
> should I lear

Hi Raghu, what kind of information do you need? The task is written in comment 0.
Please come to the irc channel #libreoffice-dev if you have general questions.
Comment 4 Anuj Agrawal 2019-03-18 16:37:05 UTC
Hi,
I would like to take up this bug. Can you just tell me from where can I access the solenv/clang-format/blacklist file?
Or do I just have to write a Python script which given a list of files outputs the list which has less than 5% of lines to be reformatted to be clang-formatted?
Comment 5 Samuel Mehrbrodt (CIB) 2019-03-19 06:34:11 UTC
(In reply to Anuj Agrawal from comment #4)
> Hi,
> I would like to take up this bug. Can you just tell me from where can I
> access the solenv/clang-format/blacklist file?
> Or do I just have to write a Python script which given a list of files
> outputs the list which has less than 5% of lines to be reformatted to be
> clang-formatted?

The blacklist file is part of our "core" repo. You need a LibreOffice build setup to do this task.
Please see https://wiki.documentfoundation.org/Development/GetInvolved and ask further questions about the setup on IRC.
Comment 6 Samuel Mehrbrodt (CIB) 2019-03-19 07:01:21 UTC
@Anuj: Raghu is currently working on this bug, so please choose another one.
Comment 7 Samuel Mehrbrodt (CIB) 2019-05-23 12:43:28 UTC
As the patch has not seen any progress since 2 months, I mark this issue as unassigned.

Anyone can continue the work started here: https://gerrit.libreoffice.org/#/c/69589/