[MacPorts] #52767: port lint should warn when modeline is missing

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[MacPorts] #52767: port lint should warn when modeline is missing

MacPorts
#52767: port lint should warn when modeline is missing
-------------------------+--------------------------------
 Reporter:  ryandesign   |      Owner:  macports-tickets@…
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  base         |    Version:  2.3.4
 Keywords:               |       Port:
-------------------------+--------------------------------
 `port lint` should warn if the Portfile doesn't have a modeline. We
 recommend a [https://guide.macports.org/chunked/development.creating-
 portfile.html standard modeline], but some ports use a slightly different
 modeline, or make it span multiple lines, or put it at the end of the
 Portfile. While I would prefer port authors use the standard modeline at
 the top of the Portfile on a single line, for lint purposes we could
 probably allow any modeline anywhere. Or maybe that's too hard to code, in
 which case we could be more restrictive.

--
Ticket URL: <https://trac.macports.org/ticket/52767>
MacPorts <https://www.macports.org/>
Ports system for macOS
_______________________________________________
macports-tickets mailing list
[hidden email]
https://lists.macosforge.org/mailman/listinfo/macports-tickets
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #52767: port lint should warn when modeline is missing

MacPorts
#52767: port lint should warn when modeline is missing
--------------------------+--------------------------------
  Reporter:  ryandesign   |      Owner:  macports-tickets@…
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:  2.3.4
Resolution:               |   Keywords:
      Port:               |
--------------------------+--------------------------------
Changes (by kurthindenburg):

 * cc: kurthindenburg (added)


Comment:

 My attempt - https://github.com/macports/macports-base/pull/26

--
Ticket URL: <https://trac.macports.org/ticket/52767#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #52767: port lint should warn when modeline is missing

MacPorts
In reply to this post by MacPorts
#52767: port lint should warn when modeline is missing
--------------------------+--------------------------------
  Reporter:  ryandesign   |      Owner:  macports-tickets@…
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:  2.3.4
Resolution:               |   Keywords:
      Port:               |
--------------------------+--------------------------------

Comment (by jmroot):

 r-

 The patch in the PR warns in every case except where exactly the
 recommended modeline is on the first line. The request here is to warn
 only if the Portfile doesn't have a modeline. The existing variation in
 modelines is valid because indentation style is up to the maintainer, and
 because some maintainers use a custom Portfile syntax highlighting mode in
 their editor and set the file type to Portfile in the modeline to enable
 that.

 The other thing that lint should complain about is if the actual
 indentation doesn't match that declared in the modeline, but that might be
 difficult.

--
Ticket URL: <https://trac.macports.org/ticket/52767#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #52767: port lint should warn when modeline is missing

MacPorts
In reply to this post by MacPorts
#52767: port lint should warn when modeline is missing
--------------------------+--------------------------------
  Reporter:  ryandesign   |      Owner:  macports-tickets@…
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:  2.3.4
Resolution:               |   Keywords:
      Port:               |
--------------------------+--------------------------------

Comment (by kurthindenburg):

 There are about 2497 warnings with the modeline on the first line; there
 are about 3 modelines warnings on other lines in all the Portfiles (~20k).

--
Ticket URL: <https://trac.macports.org/ticket/52767#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...