bugmake - Bugs: bug #48276, Better errors for accidental spaces

 
 

bug #48276: Better errors for accidental spaces

Submitted by:  Steve Klabnik <steveklabnik>
Submitted on:  Mon Jun 20 16:10:17 2016  
 
Severity: 3 - NormalItem Group: Enhancement
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: SCMOperating System: Any
Fixed Release: NoneTriage Status: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue Jun 21 03:10:05 2016, comment #3:

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

Saul St John <betafive>
Mon Jun 20 17:56:26 2016, comment #2:

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.

Steve Klabnik <steveklabnik>
Mon Jun 20 17:24:09 2016, comment #1:

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.

Paul D. Smith <psmith>
Project Administrator
Mon Jun 20 16:10:17 2016, original submission:

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?

Steve Klabnik <steveklabnik>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by betafive (Posted a comment)
  • -unavailable- added by thomaswinwood
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by steveklabnik (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Jun 20 17:26:54 2016thomaswinwoodCarbon-Copy-=>Added thomaswinwood

    Back to the top


    Powered by Savane 3.1-cleanup1