Files
error-prone-support/website
Stephan Schroevers 52932ab538 This is a squash commit of the following previous commits:
Merge branch 'master' into website

---

Undo Refaster test package split, glue it together

---

Introduce `RefasterRuleTestExtractor` for documentation generation

This new `Extractor` implementation collects Refaster example input and
output code from rule collection tests.

This change also introduces explicit compilation steps for the test
code. As a side-effect this produces faster feedback in case of invalid
input or output code.

(cherry picked from commit c8c51078332388055746b433318148f428239c18)

---

Try fix build

---

Post-rebase fix

---

Publish Error Prone compatibility matrix on website

The new `website/generate-version-compatibility-overview.sh` script
tests all combinations, and stores the result in a Jekyll data file.

---

Some cleanup

---

Make tests more maintainable

---

Try to fix htmlproofer

---

Fix source links

---

Introduce `BugPatternTestExtractor` with tests

---

Simplify tests

---

Further simplify testing setup

---

Kill another mutant and drop unused imports

---

This actually kills the mutant

---

Suggestions

---

Suggestions

---

Suggestions

---

Fix JDK 11 compatibility

---

PSM-1717 Pass `ClassLoader` to `ServiceLoader`

---

Introduce documentation generation

This is a squash commit of the following previous commits:

---

Introduce `documentation-support` module to extract website data from source code

By adding a compilation `TaskListener` that extracts data from the Bug pattern
and Refaster rule collection (test) classes and writing to JSON output files
in the target directory. This extraction happens as part of the Maven build
using the `docgen` profile.

---

Improve website styling

Co-authored-by: japborst <japborst@gmail.com>
Co-authored-by: Gijs de Jong <berichtaangijs@gmail.com>

---

Generate Markdown files from existing content for the website

---

Upgrade dependencies to the latest versions

---

Compile and install project jars before docgen

---

Run validation in build and exclude self-url

---

Reintroduce `htmlproofer`, improve templates, cleanup setup and dependencies

---

Delete directory if it exists

---

Add SCSS for GitHub button and fix bug pattern sample rendering

---

Fix bug pattern GitHub link

---

Small styling tweaks (incl. for dark theme)

---

Use single mvn command

---

Move mustache templates

---

Hardcode anchors for headings

---

Add supression to bugpatterns

---

Remove self ignore for html-proofer

---

Add refaster supressions and use callouts

---

Use v0.4.1-SNAPSHOT

---

Revert "Use single mvn command"

This reverts commit 594471d1ed23a1c19d7fe88d925d1b7f828716cd.

---

Extract Refaster samples from source code instead of AST

---

Skip verification, for now

---

Add notes on disabling bugpatterns

---

Set default layout and image

---

Fix mobile navigation

---

Revert "Set default layout and image"

This reverts commit 67a4aa7b5b4d14c0f2b783f345f53affe6ef3ec5.

---

Add supression for refaster rules

---

Post-rebase fixes

---

Fix the tests

---

Doh

---

Version bump

---

Exclude ThirdPartyLibraryTest from Bug Pattern test output

---

Remove only last occurence of 'Test' in Bug Pattern tests doc generation

---

Move `MapRulesTest` resources

---

Add exclusion for docgen of `SourceCodeTest`

---

Bump version

---

Extra fixes after rebase

---

Delete custom nav footer and `assets/images/favicon.ico`

---

Post rebase fixes with version bump to `0.8.1-SNAPSHOT`

---

Use new BugPatternTest extraction method

---

Fit Refaster extractors into new documentation support setup

---

Drop Docgen Maven profile

---

Move new rule collection

---

Improve extractor matching and update README

---

Move `SuggestedFixRules` test files

---

Fix Refaster exclusion regexes

---

Disable external link checking until the `website` branch is up-to-date with `master` again

---

Post-rebase fix

---

Not sure why `-Dverification.skip` fails while `-Dverification.warn` doesn't; won't investigate right now

---

Check external links again

---

Upgrade dependencies

---

WIP: towards dropping Mustache

---

WIP: Java doc generator

---

WIP: switch over

---

WIP: Cleanup

---

Polish

---

Bump dependencies

---

Bump Ruby

---

Sync more

---

Fix bug checker GitHub URLs

---

Fix HTMLProofer config
2025-03-26 14:07:02 +01:00
..

Error Prone Support website

This directory contains the majority of the source code that powers error-prone.picnic.tech. The website is statically generated using Jekyll.

Local development

To view the website on localhost, first follow the Jekyll installation instructions. Once done, run the following Maven commands in the root of the repository to extract the (test) data from the bug patterns and Refaster rule collections and to transform this data into a Jekyll-digestible format. Unless and relevant Java code has been changed, these commands needs to be executed once.

mvn -T1C clean install -DskipTests -Dverification.skip
mvn exec:java@generate-docs -pl documentation-support

Then to build the website for local development, execute in this directory:

bundle install
bundle exec jekyll serve --livereload

The website will now be available on port 4000. Source code modifications (including the result of rerunning mvn exec:java@generate-docs -pl documentation-support) will automatically be reflected. (An exception is _config.yml: changes to this file require a server restart.) Subsequent server restarts do not require running bundle install, unless Gemfile has been updated in the interim.

If you are not familiar with Jekyll, be sure to check out its documentation. It is recommended to follow the provided step-by-step tutorial.

We use the Just the Docs Jekyll theme, which also includes several configuration options.

Switch Ruby versions

The required Ruby version is set in .ruby-version. To switch, you can use rvm to manage your Ruby version.

Resolve Bundler issues

On macOS, you may get an error such as the following when running bundle install:

fatal error: 'openssl/ssl.h' file not found

In that case, run:

bundle config build.eventmachine --with-cppflags="-I$(brew --prefix openssl)/include"
bundle install

Deployment

The website is regenerated and deployed using the deploy-website.yml GitHub Actions workflow any time a change is merged to master.