-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove tabs and unused local variables (DONE) #5275
Remove tabs and unused local variables (DONE) #5275
Conversation
For the sake of efficiency, and to avoid having 20+ "convert tab commits" in the history and the This might also be easier for you compared to making many separate PRs? That said, I am totally fine either way |
I can do that if it's preferable, I thought you'd asked for a number of smaller PR's rather than one massive one, but perhaps I misunderstood. |
I think it might take me a little while to do the rest of the files in the library, and it might be easier to merge this PR sooner rather than later (if it's acceptable) since otherwise the PR and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor oddities... no worries, we'll figure them out and then can merge (squash-merge?) this PR soonish. Need to sleep now, though
ac7f153
to
fea6037
Compare
@fingolfin this is now complete, I've removed all unused local variables and tabs from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a quick look through and these all seem sensible. I looked closely at a few places where local variables had very suspicious names (like PrintObj
or Error
), but these variables were never used for anything, so removing them is safe (and good).
Thanks @ChrisJefferson, I was going to say: I'll squash the commits which remove tabs into one, and the same for the commits removing unused local variables, if this PR gets the green light. |
Thanks I'll have a look in a bit, too. I am slightly vary about the files in hpcgap/lib/ getting out of sync. Perhaps there aren't too many tabs in them, though? |
1 similar comment
Thanks I'll have a look in a bit, too. I am slightly vary about the files in hpcgap/lib/ getting out of sync. Perhaps there aren't too many tabs in them, though? |
Good point @fingolfin, there are apparently 167 lines with tabs in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checke a-e, all good, some very minor suggestions for improvements. I'll look at the rest later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done a-f
742884b
to
cb55a6a
Compare
Ugh, and I just accidentally force pushed and removed the changes that I merged on GitHub directly, I'll fix those again, sorry. Also the latest commit in this PR removes some variables that are assigned but never used. I'm happy to put this in a separate PR if that's better, this change might be more problematic than the removal of unused local variables if the assignment of the variables has side effects. I've only removed those assigned but unused variables where I was fairly sure there'd be no side effects, in the other cases, I just remove the variable but left the right hand side of the assignment with a comment asking if the line is really required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done until and including grppccom.gi
A bunch of minor remarks; many are about formatting issues that were present before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done a-l
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completed a-o
If this PR is squashed (not saying it has to be), could it be put into at least 3 commits?
|
@ChrisJefferson yes, I'll do that once everything is ok |
Thanks for the comments @fingolfin, I imagine it was as interesting to look at the changes in these files as it was to make them :) I think I've addressed all of your comments now, please let me know when you're done, so I can squash the commits according to what @ChrisJefferson suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
covered a-z now
@james-d-mitchell how shall we proceed to get this merged? There are still comments by me (which I could apply, or not, or you; I am fine either way, just don't want to cause accidents). Also, the linter CI actually fails? |
@@ -1,5 +1,4 @@ | |||
disable: | |||
- W000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these .gaplint.yml
are not possible while there are still files in hpcgap/lib/
which are not de-tabbed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@james-d-mitchell how shall we proceed to get this merged? There are still comments by me (which I could apply, or not, or you; I am fine either way, just don't want to cause accidents).
Also, the linter CI actually fails?
Thanks @fingolfin I'll finish this off at the start of next week when back at work, sorry for the seasonal delay :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fingolfin I think I've now finished this in the sense that I've remove all tabs, unused local variables, and assigned but not used local variables in the library, and in hpc gap. The latter required some changes to gaplint
which I released in v1.1.4 a couple of moments ago, although I pushed to this branch after the release it looks like it might take a little longer to become available, and I'd expect the "lint" job pass when gaplint v1.1.4 is available.
Looks like one of the other tests has failed but I don't think that's related to this PR, although I might be wrong.
The final thing I'll do once this has the green light is to squash into the 3 commits that @ChrisJefferson suggested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've restarted the gaplint job. If it finishes, please squash as described.
The testexpect
failure is indeed separate, see issue #5309
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will squash now thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squashed, hopefully correctly.
7746c76
to
20ebe5b
Compare
@@ -656,7 +654,7 @@ InstallGlobalFunction( PresentationRegularPermutationGroupNC, function ( G ) | |||
if gen0[c] = 0 then | |||
app[10] := g; | |||
app[11] := c; | |||
n := MakeConsequences( app ); | |||
MakeConsequences( app ); # TODO is this line required? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is definitely needed.
MakeConsequences( app ); # TODO is this line required? | |
MakeConsequences( app ); |
But fine by me to clean this up in a separate PR later (I can do it myself). Just wanted to mark it here so I don't forget.
(One CI test had a spurious failure due to a download timeout, I've just restarted it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @fingolfin !
This PR removes all tabs and unused local variables from files starting "c" in the library. There were no tabs and no unused local variables in files starting "b" in the library, hence the lack of a PR for these.
Text for release notes
None