[Rpm-maint] [rpm-software-management/rpm] Warn if a text is after %else or %endif (#625)

Panu Matilainen notifications at github.com
Wed Feb 27 14:41:18 UTC 2019


It's always fascinating to see what gets unearthed when new warnings are added. Looking at a dump of all Fedora specs from mid-December, I get 2769 hits of this warning out of 21801 specs. The vast majority are of this entirely harmless type that just assumes comments are legit anywhere:
```
 %endif # with_python3
```
Then there's the mostly harmless variants on the above where it's a macro (commented or not), such as
```
%endif %{__with_wxwidgets}
%endif # 0%{?rel_build}
```
Then there stranger cases, such as ```%else:```, ```%endif.```, ```%endif%```, ```%endif1599521)```,  ```%else !use_embedded```, those inevitable attempts to do ```%else %if``` that wont work at all. Etc.

It's good to catch especially the ones from the third group, but clearly there's also a real need to comment these things in large and complex specs. We only support comments at the beginning of line, but I do feel a bit bad about outlawing the first group of usage. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/625#issuecomment-467886881
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190227/0919a9f6/attachment.html>


More information about the Rpm-maint mailing list