[bug #48276] Better errors for accidental spaces

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #48276] Better errors for accidental spaces

David Boyce-5
URL:
  <http://savannah.gnu.org/bugs/?48276>

                 Summary: Better errors for accidental spaces
                 Project: make
            Submitted by: steveklabnik
            Submitted on: Mon 20 Jun 2016 04:10:17 PM GMT
                Severity: 3 - Normal
              Item Group: Enhancement
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: SCM
        Operating System: Any
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Hey there,

Over the weekend, I was working with someone who uses spaces over tabs in all
the programming that they do. Their editor wasn't properly configured to
switch when using make, and so they got the classic "missing separator." error
message. Today, I learned that make already has a special error for an
eight-space indent, "missing separator (did you mean TAB instead of 8
spaces?)."

I know eight spaces is classic, but many languages use two or four space
indents as a style. Would there be any interest in also adding messages for
these cases? I have written a simple patch for this, but since I'm not a
project member, cannot submit it directly.

Is there any interest in a patch for this? My current iteration is to do the
simplest thing, and detect 2 and 4 directly, but I think with some work I
could make it detect an arbitrary number, if that's preferred. Thoughts?




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48276>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #48276] Better errors for accidental spaces

David Boyce-5
Follow-up Comment #1, bug #48276 (project make):

I'm not that excited about this idea.  The problem is that lots of makefiles
indent their variables, rules, etc.  For example inside "ifeq" statements, or
even just to right-align variable assignments.  Having warnings about changing
to TAB on most even-spaced indentations seems like it could be more confusing
than helpful.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48276>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #48276] Better errors for accidental spaces

David Boyce-5
Follow-up Comment #2, bug #48276 (project make):

So, I am not incredibly familiar with the codebase, but this is seemingly on a
code path where an error is already going to happen; ie, this is a more
specific form of error, rather than changing something that would have
previously been parsed successfully into a failure. I would certainly agree
that breaking such things wouldn't be good.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48276>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #48276] Better errors for accidental spaces

David Boyce-5
Follow-up Comment #3, bug #48276 (project make):

+1, agree with Steve, such a suggestion would have saved me time and
frustration at least once.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48276>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-make mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-make
Reply | Threaded
Open this post in threaded view
|

[bug #48276] Better errors for accidental spaces

David Boyce-5
Additional Item Attachment, bug #48276 (project make):

File name: make.diff.txt                  Size:0 KB
    <https://file.savannah.gnu.org/file/make.diff.txt?file_id=49688>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?48276>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/