Skip to content

Address Sonarcloud issues for the html code; improve on css styles#892

Merged
rdmark merged 26 commits intodevelopfrom
rdmark-sonar-webui
Oct 7, 2022
Merged

Address Sonarcloud issues for the html code; improve on css styles#892
rdmark merged 26 commits intodevelopfrom
rdmark-sonar-webui

Conversation

@rdmark
Copy link
Copy Markdown
Member

@rdmark rdmark commented Oct 5, 2022

  • Add labels for each form input, and tweak placeholder text accordingly.
  • Move CSS styles to the stylesheet; minor tweaks for clarity and consistency
  • Use the legacy align=center attribute for centering paragraphs (backwards compatible)
  • Remove all instances of using tables for layout
  • Add header tags to all remaining tables, with scope parameters.
  • Add descriptions to each table
  • Move drive reference hyperlinks to the drive name column (addresses "same link text leads to different URL" code smell.)
  • Inject lang parameters to each html tag
  • Standardize on h2 tags as top header for each template
  • Add 'json' to config file UI elements, to communicate actual file name/format
  • Clean up indentation
  • Dropbox styling: Added a colored outline, added padding to more clearly communicate its function. Hid the (X) SVG that indicates failure, since failure is already communicated by the error text. Also, the SVG always obstructed the file name or error so was quite counter-productive.

@rdmark rdmark requested a review from nucleogenic October 5, 2022 02:43
@rdmark
Copy link
Copy Markdown
Member Author

rdmark commented Oct 5, 2022

@uweseimet FYI, I'm addressing issues reported by SonarCloud for the html code here.

I've also tweaked the rules so that we may see more structural and semantic issues raised in the next report.

@rdmark rdmark marked this pull request as ready for review October 5, 2022 06:28
@uweseimet
Copy link
Copy Markdown
Contributor

@rdmark Regarding SonarCloud, any news on making the develop branch a long-living branch?

@uweseimet
Copy link
Copy Markdown
Contributor

@rdmark There are more HTML issues reported now, indeed.

I would also like to make the C++ rules stricter. Can you please enable these currently inactive rules?

  • "dynamic_cast" should be used for downcasting
  • Flexible array members should not be declared
  • Unused functions and methods should be removed
  • GNU extensions should not be used
  • "auto" should not be used to deduce raw pointers
  • "switch" statements should cover all cases
  • [[nodiscard]] should be used when the return value of a function should not be ignored

Depending on the result I might have to asked you to disable some of these rules again. Sometimes it's hard to assess the effect of additional rules unless you see it.

@akuker
Copy link
Copy Markdown
Member

akuker commented Oct 5, 2022

I don't agree with the "GNU extensions should not be used" rule. When are we going to use a non-GNU compiler?

I'm OK with trying these to see what happens. But, I'd like to move past the huge PRs that don't fix functional issues or add features. Around October 15th or so, I'd like to lock down the code base to only bug fixes so we can shoot for a stable release at the end of the month.

@uweseimet
Copy link
Copy Markdown
Contributor

@akuker Sounds fine for me. Regarding the GNU extension settings I don't consider it important. i was just curious whether there is actually anything GNU specific being used.

Copy link
Copy Markdown
Member

@nucleogenic nucleogenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've given this a first pass. It's definitely looking a lot cleaner already.

A sprinkling of somewhat nitpicky comments.

I've done some basic testing in Netscape 4.08, Classilla, iCab, etc and didn't notice any major issues.

@rdmark rdmark requested a review from nucleogenic October 6, 2022 03:17
@rdmark rdmark requested a review from nucleogenic October 6, 2022 22:38
Copy link
Copy Markdown
Member

@nucleogenic nucleogenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check drive creation from the named drives page? Getting an error here.

@rdmark rdmark requested a review from nucleogenic October 7, 2022 03:37
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Oct 7, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@rdmark rdmark merged commit d1a7034 into develop Oct 7, 2022
@rdmark rdmark deleted the rdmark-sonar-webui branch October 7, 2022 20:13
rdmark added a commit that referenced this pull request Oct 7, 2022
)

Refactor and clean up code to conform to SonarCloud static analysis, improve readability and semantics.
- Add labels for each form input, and tweak placeholder text accordingly.
- Move CSS styles to the stylesheet; minor tweaks for clarity and consistency
- Use the legacy align=center attribute for centering paragraphs (backwards compatible)
- Remove all instances of using tables for layout
- Add header tags to all remaining tables, with scope parameters.
- Add descriptions to each table
- Move drive reference hyperlinks to the drive name column (addresses "same link text leads to different URL" code smell.)
- Inject lang parameters to each html tag
- Standardize on h2 tags as top header for each template
- Add 'json' to config file UI elements, to communicate actual file name/format
- Clean up indentation
- Dropbox styling: Added a colored outline, added padding to more clearly communicate its function. Hid the (X) SVG that indicates failure, since failure is already communicated by the error text. Also, the SVG always obstructed the file name or error so was quite counter-productive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants