jameshughes89 / cs102

CS 102: Data Structures --- Java
http://csci162.com/
GNU General Public License v3.0
10 stars 17 forks source link

:memo: :telescope: Add formatter for restructured text files #155

Open jameshughes89 opened 3 years ago

jameshughes89 commented 3 years ago

Related Issues or PRs

Related to #56 and #152

What

Find and add an rst file formatter for the repo.

Why

The Java formatter is working just fine (#56 & #152), but it won't apply to java code within rst files. Further, unfortunately the rst plugin for IntelliJ doesn't add a formatter.

Currently there are settings for a formatter for arbitrary files, but it only allows setting indents and it also doesn't quite seem to work the way you'd expect on rst files.

How

I saw a few formatters out there on github. Look into these and see what can be done. I'm wondering if there is an action for this too.

Additional Notes

Not critical, but nice to have.

jameshughes89 commented 3 years ago

I tried to hack the .editorconfig to use the *.java rules on `.rst files, but sadly, no luck.

jameshughes89 commented 3 years ago

I found this, which may be an easy fix https://pypi.org/project/rstfmt/