Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18029

Selected line with static analysis violation is hidden because breadcrumb covers it

    XMLWordPrintable

Details

    Description

      If a line number in Cppcheck Results is clicked to see the related code, the resulting page will scroll exactly to this line. It is the first displayed line on the screen. Everything is correct, but it would be better if the page scrolled e.g. 10 lines above to be able to see the context too. Newer versions of Jenkins show a breadcrumb navigation on top of the screen, that even hides the highlighted line which is confusing. See the attached screenshots.

      Attachments

        Issue Links

          Activity

            I'm sorry I don't understand the issue.

            gbois Gregory Boissinot added a comment - I'm sorry I don't understand the issue.
            exotic Jan Magur added a comment - - edited

            Did you check attached screenshots and their names? Breadcrumb is new navigation menu on top of page.

            exotic Jan Magur added a comment - - edited Did you check attached screenshots and their names? Breadcrumb is new navigation menu on top of page.
            mstahlberg M Stahlberg added a comment -

            I have exactly the same problem.

            When you click on the line number in the list of Cppcheck results, the source code page will be shown with the line containing the error highlighted. The page scrolls down so that the highligted line appears at the top of the window. However the very first line is obscured by the navigation bar (breadcrumb) so that you can't see it.

            mstahlberg M Stahlberg added a comment - I have exactly the same problem. When you click on the line number in the list of Cppcheck results, the source code page will be shown with the line containing the error highlighted. The page scrolls down so that the highligted line appears at the top of the window. However the very first line is obscured by the navigation bar (breadcrumb) so that you can't see it.
            yoichi Yoichi Nakayama added a comment - - edited

            For reference, analysis-core uses 10 line offset for the link as:
            https://github.com/jenkinsci/analysis-core-plugin/blob/c27e8fe79ca4fecc4e485e3fda23982e37b59f4e/src/main/java/hudson/plugins/analysis/util/model/AbstractAnnotation.java#L424

            Showing some lines before the target line is useful to read the context, too.

            yoichi Yoichi Nakayama added a comment - - edited For reference, analysis-core uses 10 line offset for the link as: https://github.com/jenkinsci/analysis-core-plugin/blob/c27e8fe79ca4fecc4e485e3fda23982e37b59f4e/src/main/java/hudson/plugins/analysis/util/model/AbstractAnnotation.java#L424 Showing some lines before the target line is useful to read the context, too.
            mixalturek Michal Turek added a comment -

            The task description updated to contain an information.

            mixalturek Michal Turek added a comment - The task description updated to contain an information.
            mixalturek Michal Turek added a comment -

            Fixed, will be released in version 1.15.

            mixalturek Michal Turek added a comment - Fixed, will be released in version 1.15.

            Code changed in jenkins
            User: Michal Turek
            Path:
            src/main/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckSource.java
            src/main/java/com/thalesgroup/hudson/plugins/cppcheck/model/CppcheckFile.java
            src/main/resources/org/jenkinsci/plugins/cppcheck/CppcheckResult/details.jelly
            http://jenkins-ci.org/commit/cppcheck-plugin/70008f01f202df6f76d068551c2dffaaae0578f2
            Log:
            JENKINS-18029 Selected line with static analysis violation is hidden because breadcrumb covers it

            • The page with source code now scrolls 10 lines above the highlighted one to be able to see the context.
            • @SuppressWarnings("unused") removed to solve compiler warnings.
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michal Turek Path: src/main/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckSource.java src/main/java/com/thalesgroup/hudson/plugins/cppcheck/model/CppcheckFile.java src/main/resources/org/jenkinsci/plugins/cppcheck/CppcheckResult/details.jelly http://jenkins-ci.org/commit/cppcheck-plugin/70008f01f202df6f76d068551c2dffaaae0578f2 Log: JENKINS-18029 Selected line with static analysis violation is hidden because breadcrumb covers it The page with source code now scrolls 10 lines above the highlighted one to be able to see the context. @SuppressWarnings("unused") removed to solve compiler warnings.

            Code changed in jenkins
            User: Michal Turek
            Path:
            src/main/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckSource.java
            src/main/java/com/thalesgroup/hudson/plugins/cppcheck/model/CppcheckFile.java
            src/main/resources/org/jenkinsci/plugins/cppcheck/CppcheckResult/details.jelly
            http://jenkins-ci.org/commit/cppcheck-plugin/5ba9108df7e32c65c936b7814e13281f537e9a34
            Log:
            Merge pull request #4 from mixalturek/master

            JENKINS-18029 Selected line with static analysis violation is hidden because breadcrumb covers it

            Compare: https://github.com/jenkinsci/cppcheck-plugin/compare/2962a47f7f0b...5ba9108df7e3

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michal Turek Path: src/main/java/com/thalesgroup/hudson/plugins/cppcheck/CppcheckSource.java src/main/java/com/thalesgroup/hudson/plugins/cppcheck/model/CppcheckFile.java src/main/resources/org/jenkinsci/plugins/cppcheck/CppcheckResult/details.jelly http://jenkins-ci.org/commit/cppcheck-plugin/5ba9108df7e32c65c936b7814e13281f537e9a34 Log: Merge pull request #4 from mixalturek/master JENKINS-18029 Selected line with static analysis violation is hidden because breadcrumb covers it Compare: https://github.com/jenkinsci/cppcheck-plugin/compare/2962a47f7f0b...5ba9108df7e3

            People

              mixalturek Michal Turek
              exotic Jan Magur
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: