Opened 5 years ago

Closed 5 years ago

#21792 closed defect (fixed)

Fix indents and trailing whitespace

Reported by: jdemeyer Owned by:
Priority: minor Milestone: sage-7.5
Component: scripts Keywords:
Cc: embray, dimpase, mkoeppe Merged in:
Authors: Jeroen Demeyer Reviewers: Matthias Koeppe, John Palmieri
Report Upstream: N/A Work issues:
Branch: b7d7a71 (Commits, GitHub, GitLab) Commit: b7d7a71bf1b97f67235ca1737b6cc07c94ce7ecc
Dependencies: Stopgaps:

Status badges

Description (last modified by jdemeyer)

In all scripts: Use spaces, not a mixture of spaces and TABs to indent. Also remove all trailing whitespace.

Change History (18)

comment:1 Changed 5 years ago by jdemeyer

  • Summary changed from Fix indents in sage-spkg to Fix indents in scripts

comment:2 Changed 5 years ago by jdemeyer

  • Summary changed from Fix indents in scripts to Use spaces to indent in scripts

comment:3 Changed 5 years ago by jdemeyer

  • Description modified (diff)
  • Summary changed from Use spaces to indent in scripts to Fix indents and trailing whitespace

comment:4 Changed 5 years ago by jdemeyer

  • Branch set to u/jdemeyer/fix_indents_in_sage_spkg

comment:5 Changed 5 years ago by jdemeyer

  • Commit set to 3e9aee326c173afbdf70c3d8fd23883fb428b709

This is a totally trivial ticket. To avoid merge conflicts, a quick review would come in handy.


New commits:

3e9aee3Fix indents and trailing spaces in scripts

comment:6 Changed 5 years ago by jdemeyer

  • Status changed from new to needs_review

comment:7 Changed 5 years ago by dimpase

Have you used a script to do this? If so, can we have a look at it?

comment:8 Changed 5 years ago by jdemeyer

It was a very trivial sed script, replacing every TAB by 8 spaces and deleting all trailing spaces. I had to undo a few cases where the TABs were in Makefiles or where the TABs were not leading space.

comment:9 Changed 5 years ago by mkoeppe

Perhaps the whitespace policy should be documented in our developer manual.

comment:10 Changed 5 years ago by mkoeppe

And we should have a .dir-locals.el and its equivalent (if any) for vim users.

https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html

Last edited 5 years ago by mkoeppe (previous) (diff)

comment:11 Changed 5 years ago by mkoeppe

I've created ticket #21793 for that.

comment:12 Changed 5 years ago by mkoeppe

  • Reviewers set to Matthias Koeppe
  • Status changed from needs_review to positive_review

comment:13 Changed 5 years ago by jhpalmieri

  • Status changed from positive_review to needs_work

On my OS X machine, the change to ecm/spkg-install leads to

./spkg-install: line 293: syntax error: unexpected end of file

Undo the change and it works fine. (The - in cat >foo.c <<-"EOF" means to strip leading tabs, and << is looking for just "EOF" all by itself, so the line EOF needs to be indented strictly by tabs or not at all.)

comment:14 Changed 5 years ago by git

  • Commit changed from 3e9aee326c173afbdf70c3d8fd23883fb428b709 to b7d7a71bf1b97f67235ca1737b6cc07c94ce7ecc

Branch pushed to git repo; I updated commit sha1. New commits:

b7d7a71Don't use <<- here documents

comment:15 Changed 5 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:16 Changed 5 years ago by jdemeyer

I think it's confusing to require TABs, so I used an ordinary here document with <<.

comment:17 Changed 5 years ago by jhpalmieri

  • Reviewers changed from Matthias Koeppe to Matthias Koeppe, John Palmieri
  • Status changed from needs_review to positive_review

Okay, looks good.

comment:18 Changed 5 years ago by vbraun

  • Branch changed from u/jdemeyer/fix_indents_in_sage_spkg to b7d7a71bf1b97f67235ca1737b6cc07c94ce7ecc
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.