Specs coding standard (Was: Re: [Proposal] Mass change: remove executing gtk-update-icon-cache in %post/%postu/%postrans to update hicolor theme cache)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3 January 2018 at 22:51, Adam Williamson <adamwill@xxxxxxxxxxxxxxxxx> wrote:
[..]
> If you still want to do it, I mean, you do you, but it would be a
> *terrible* idea to bundle clear and obvious technical improvements in
> with the idea of some kind of spec style guide (and enforcement).
> Please treat it as an entirely separate proposal. Thanks.

I'm not proposing such spec style guide in native language.
This could be done by simple indentation script over which must be
filtered every spec file.
I've already posted example of such script. This script needs to be
updated (because in this form it was used more than decade ago) then
used.
On first time all spec files should be used and each new enhancements.

Indentation is it is not a mater personal preferences. It is the same
IMPORTANT as using exact indentation in C or other languages source
code. it makes spec files code easier to read and understand by other
people. It makes easier to find bugs by simple relaying on some coding
patterns.
I remember that on start use such indentation tool was possible not
only bring the same style but find as well some number spec of CODING
BUGS.
Generally what I'm proposing is not kind of revolution but more
evolution by use initially only few coding patterns which I've already
listed like:
- put in exact order spec fields in spec preamble
- format all %description to 80 cols
- put in spec exact order of %packages, %files and other sections
- substitute exact strings to use macros

After this such list can be extended and each time after passing
agreement/voting to use exact new patterns all specs should be changed
in one go.
At some point on git server side this script could be hooked into
commit filters to refuse commits of the specs if this script will be
able to add some changes.
In other words apply exact coding standard should be kind of continuous process.

kloczek
PS. I was wrong that it will be possible to modify 90% of the specs
automatically.
In reality proportions are completely opposite and only less than 10%
is possible to change using some text substitution.
This is clear indicator how really bad is with all Fedora spec common
coding standards.
-- 
Tomasz Kłoczko | LinkedIn: http://lnkd.in/FXPWxH
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux