diff --git a/README.adoc b/README.adoc index 4d8d7be104..9bd22684db 100644 --- a/README.adoc +++ b/README.adoc @@ -28,6 +28,9 @@ include::supported_languages.adoc[] Go to the https://sonarsource.github.io/rspec/#/[Search Page] to find the rules that have already been merged in the `master` branch. Go the the GitHub https://github.com/SonarSource/rspec/pulls[pull-request] tab to find the rules that have not been merged yet. +You can use the "Search in unimplemented" link on the Search Page to repeat your search in the PRs. + +WARNING: Unlike the Search Page, the GitHub search across the PRs for unimplemented rules considers only the PR summary and title. It does not search the content of the proposed rule (i.e. it does not look into `rule.adoc` nor into `metadata.json`). == Create or modify a rule @@ -50,10 +53,15 @@ image::img/new-rule-workflow.png[] ==== To modify an existing rule Create a branch for your modifications manually. Then open a pull request manually. -In the subject add the following text: +The subject must start with the following required prefix: ---- Modify rule Sxxxx ---- +Add a short summary of the PR after the required prefix. For example: +---- +Modify rule S1234: Allow tail recursion for languages supporting TCO +---- + ==== To deprecate a rule Create a branch for the deprecation manually. @@ -74,9 +82,23 @@ NOTE: use a GitHub hot-key `t` in the source view to navigate to an existing rul === 2. Edit the pull request -You should see https://github.com/pulls/assigned[a new pull request assigned to you]. It might take up to a minute to appear. +You should see https://github.com/pulls/assigned[a new pull request assigned to you]. It might take up to a few minutes to appear. It contains a scaffolding of files for the new rule. Feel free to modify it as you please. +The title of the PR for a new rule will say only "Create rule Sxxxx", which is not very informative. + +Modify the title to better summarize the nature or the rule, so that it is easier to find when searching through unimplemented rules. +Do preserve the "Create rule Sxxxx" prefix, as it is used by our tooling. +For example: + +---- +Create rule S7028: All identifiers should be in CamelCase +---- + +Add the description of the PR to further increase its discoverability +(GitHub PR search does not see the `rule.adoc`). +To do that, click on the three dots (next to the smile) on the first comment (created by github-actions bot) and select "Edit". + The rule must contain subdirectories corresponding to all the languages this rule is implemented for. Each language subdirectory contains the `rule.adoc` that is the root document used to render the specification. diff --git a/frontend/src/SearchPage.style.ts b/frontend/src/SearchPage.style.ts index 7b9c4973e3..8b17314e79 100644 --- a/frontend/src/SearchPage.style.ts +++ b/frontend/src/SearchPage.style.ts @@ -16,6 +16,11 @@ export default makeStyles((theme) => ({ searchResults: { marginTop: theme.spacing(3), }, + topRow: { + display: 'flex', + flexDirection: 'row', + justifyContent: 'space-between' + }, resultsCount: { marginBottom: theme.spacing(2), } diff --git a/frontend/src/SearchPage.tsx b/frontend/src/SearchPage.tsx index 80e5a7030c..5dabd85eb0 100644 --- a/frontend/src/SearchPage.tsx +++ b/frontend/src/SearchPage.tsx @@ -7,6 +7,7 @@ import Container from '@material-ui/core/Container'; import Grid from '@material-ui/core/Grid'; import Pagination from '@material-ui/lab/Pagination'; import Box from '@material-ui/core/Box'; +import Button from '@material-ui/core/Button'; import useStyles from './SearchPage.style'; import { useSearch } from './utils/useSearch'; @@ -146,8 +147,13 @@ export const SearchPage = () => { - - Number of rules found: {numberOfHits} + + + Number of rules found: {numberOfHits} + + + Search in unimplemented + {resultsDisplay} ({ title: { flexGrow: 1, }, -})); \ No newline at end of file +})); diff --git a/frontend/src/TopBar.tsx b/frontend/src/TopBar.tsx index d8db7aaefb..875660f64f 100644 --- a/frontend/src/TopBar.tsx +++ b/frontend/src/TopBar.tsx @@ -3,6 +3,7 @@ import AppBar from '@material-ui/core/AppBar'; import Toolbar from '@material-ui/core/Toolbar'; import Typography from '@material-ui/core/Typography'; import IconButton from '@material-ui/core/IconButton'; +import Button from '@material-ui/core/Button'; import MenuIcon from '@material-ui/icons/Menu'; import useStyles from './TopBar.style'; @@ -19,6 +20,11 @@ export default function TopBar() { SonarSource Rule Specifications + + + );