In which we do some automated policing.
Improve the Blog Every Third Day
I did a bunch of work on the new version of the blog (Jekyll 3, clean dark theme), converting all but the middle thirty posts; but more importantly, I did some long-overdue automation of the process using RegReplace.
It took a little bit of doing, but the sequence of heavily regex’d find-and-replace tasks are now a single Sublime command.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
(Note: The percent sign is only escaped here to keep Jekyll from processing it.)
1 2 3 4 5 6 7 8 9 10 |
|
Now I’m comfortable to say I can do the switch-over in the next week or so.
Throw it in the Cloud Every Thirteenth Day
One of the overdue items on this project is some sort of continuous integration. It’ll be awkward with the legacy Windows server, but probably worth it. For now, though, let’s just get the ball rolling with some test code linting.
GitLab CI
I’ve used Travis CI quite a bit professionally, but since we’re on GitLab for this,
I thought I’d give their new CI offerings a try. I created a .gitlab-ci.yml
based on their
example code:
1 2 3 4 5 6 7 8 9 10 |
|
I pushed it up, and… nothing. No errors, but no building. Experimented on some other repositories, and it was just this one that was ignoring my CI config. After a lot of poking around, I found the problem:
Project Settings -> Feature Visibility -> Repository -> Builds
was set to Disabled, which I must
have thought was a good idea at some point. Once I made it anything else,
Rubocop was run as expected.
Rubocop
I had been writing a bunch of code in a general-purpose editor, without ever running it through a linter, so the results are not unexpected:
30 files inspected, 1031 offenses detected
ERROR: Build failed: exit code 1
And this is after I made a configuration change:
2 3 |
|
As nostalgic as I sometimes am for “the good old days”, I feel terribly constrained by eighty-character lines. One hundred seemed a nice round number, so I’ve settled on that.
Well, Rubocop’s certainly given us plenty of work to do. Tomorrow.