eecs280staff / tutorials

Tools and tutorials
https://eecs280staff.github.io/tutorials/
Other
5 stars 4 forks source link

oclint version #20

Closed jamesjuett closed 2 months ago

jamesjuett commented 2 years ago

We use the -no-analytics option in our oclint commands, but it appears this no longer works in recent version of oclint.

The present documentation for oclint still indicates -no-analytics as an option, but it doesn't work in the newest version, 22.02, and causes the command to immediately error out.

After some digging, it appears analytics were removed here:
https://github.com/oclint/oclint/commit/a1984d9be5845c74754a2d0d416b37c7601f3c83

This is a bit obnoxious, since it means you specifically need an old version of oclint to run the style checks.

It appears we're currently on 0.13. That version is present:

The current version of oclint is 22.02. If we want to upgrade, we'd have to change it (or request CAEN change it) in all the places above.

Alternately we could add some specific instructions, e.g. to our CONTRIBUTING.md that you need to use the old 0.13 version if you're doing any local work.

In the future, maybe we should consider moving to a different tool, such as Clang-Tidy?

jamesjuett commented 2 years ago

Also, at least on my Ubuntu on WSL, I got this error with oclint 0.13:

oclint: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

sudo apt install libncurses5 fixed this.

awdeorio commented 2 years ago

Adding another wrinkle: the default oclint install on macOS does not work at all out-of-the-box. There are a zillion errors about shared libraries that lack permissions.

jamesjuett commented 5 months ago

FYI, I've requested OCLint 22.02 on CAEN for F24.

awdeorio commented 5 months ago

That is great!

On Tue, May 14, 2024 at 12:47 PM James Juett @.***> wrote:

FYI, I've requested OCLint 22.02 on CAEN for F24.

— Reply to this email directly, view it on GitHub https://github.com/eecs280staff/tutorials/issues/20#issuecomment-2110688222, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZHZHIQIRJVACBA7WEFYJ3ZCI52DAVCNFSM6AAAAAARPKA4QSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJQGY4DQMRSGI . You are receiving this because you commented.Message ID: @.***>

-- http://andrewdeorio.com Computer Science and Engineering Dept. @ The University of Michigan

jamesjuett commented 2 months ago

Resolving this via update to oclint-22.02, starting in F24.

It's now available on CAEN Linux in /opt/oclint-22.02.

Our eecs280 autograder image is updated to use 22.02. I've rebuilt it on the F24 autograder.io site with the updated Dockerfile in

Individual projects are updated via these PRs:

Style checking tutorial is updated via #183.

awdeorio commented 2 months ago

Since I know that @jamesjuett uses Windows/WSL, I'll add that the latest stable macOS install matches your version (22.02).

$ oclint --version
OCLint (https://oclint.org):
  OCLint version 22.02.
  Built Feb 20 2022 (07:40:36).
jamesjuett commented 2 months ago

Thanks, Drew!

jamesjuett commented 2 months ago

All projects have been updated, plus tutorial. Closing.