Bug 67350 - sanity check utility for help ids
Summary: sanity check utility for help ids
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: contrib (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Mat M
URL:
Whiteboard: target:4.3.0
Keywords: difficultyBeginner, easyHack
Depends on:
Blocks:
 
Reported: 2013-07-26 11:20 UTC by Caolán McNamara
Modified: 2016-02-18 16:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caolán McNamara 2013-07-26 11:20:42 UTC
help ids in helpcontent2 are of form "hid/SOMETHING" and <ahelp hid="SOMETHING">.

When the SOMETHING contains a "/" then the SOMETHING is a path to a .ui + name of widget in that .ui file, e.g. modules/scalc/ui/namerangesdialog/NameRangesDialog

What we want to do is to ensure that there are no typos in the help ids in helpcontent2 referring to widgets that don't exist. The help files are in xml and the .ui files are in xml, so it should be fairly easy to parse both and confirm that all "hid"s which contain a / in them exist or do not exist in a .ui
Comment 1 Caolán McNamara 2013-07-26 11:23:14 UTC
FWIW a different tool we have is ./bin/lint-ui.py which check that a .ui file complies to certain guidelines, so that could be a useful template to copy and paste to bootstrap from
Comment 2 Björn Michaelsen 2013-10-04 18:46:55 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 3 Mat M 2014-02-07 22:32:13 UTC
Hello

To confirm the goal:

With 
https://gerrit.libreoffice.org/gitweb?p=help.git;a=blob;f=source/text/sbasic/shared/01/06130000.xhp;hb=297543fff266d60698d32021757ad9b419a9862c
line 43: <paragraph role="paragraph" id="par_id3153190" xml-lang="en-US" l10n="U" oldref="8"><ahelp hid="modules/BasicIDE/ui/basicmacrodialog/libraries">

We go to 
http://opengrok.libreoffice.org/xref/core/basctl/uiconfig/basicide/ui/basicmacrodialog.ui 
and we don't find libraries, which should raise an error

With 
https://gerrit.libreoffice.org/gitweb?p=help.git;a=blob;f=source/text/scalc/01/04070400.xhp;hb=297543fff266d60698d32021757ad9b419a9862c
line48: <paragraph role="paragraph" id="par_id3154731" xml-lang="en-US" l10n="U" oldref="4"><ahelp hid="modules/scalc/ui/namerangesdialog/edassign">

we go to 
http://opengrok.libreoffice.org/xref/core/sc/uiconfig/scalc/ui/namerangesdialog.ui#105
which has the edassign value, so is clear.


TY
Comment 4 Caolán McNamara 2014-02-11 16:47:09 UTC
Yeah, that's the goal. Though we need to add a few little tweaks, e.g. strip anything after ":" off the name of a widget in the .ui, i.e.

re

"http://opengrok.libreoffice.org/xref/core/basctl/uiconfig/basicide/ui/basicmacrodialog.ui 
and we don't find libraries, which should raise an error" in that case we have "libraries:border" which is allowed
Comment 5 Mat M 2014-02-11 23:51:40 UTC
Caolan: Thanks for poitning that out.

So the :border is just a kind of qualifier and this element:
<object class="basctllo-TreeListBox" id="libraries:border">
is legal as a pointer for help ids ?

Is this the only "deformed" value we can get for ids (a colon followed by something) or something else could happen ?

TY
Comment 6 Caolán McNamara 2014-02-12 11:27:24 UTC
yeah the : is the only hack on names
Comment 7 Commit Notification 2014-03-21 11:40:18 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=cba805e15a2ac1cfaf3004b63ef20ad797926939

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2014-03-21 11:43:47 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=e4b149ab0749be72cfb6acfcea01c0cf296fe6cc

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2014-03-21 11:45:11 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=a193d80ec52e7e90015b4ab59c533dbd04d1c7e9

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2014-03-21 13:10:01 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=1c838635c1815acecafb0c6634d67515ba475ced

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2014-03-21 13:33:20 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=8af55c32f7b639ad95ea753d7a6c2c4276eee1ec

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2014-03-21 13:33:40 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=8a29d34fec7d051bed1f2d47fea39455043c456a

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2014-03-21 13:33:57 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=7182afe0322254178ed9b6096a62c9cc8c6f3b62

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2014-03-21 15:00:26 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=3297aa5b1adf85c647149bc2c7554926f6a17c76

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2014-03-21 15:00:42 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=bbbbc60b235a1106223970597d6fe454611edd8a

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2014-03-21 15:01:00 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=7f0f15ddaddf3ca1650d352df3c5f2ebc8f388e3

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2014-03-21 15:01:15 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=9c01be3fee47ca39553f0e9aed8b3924a325f2fc

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2014-03-21 15:01:30 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=8f906dd6652e5e0c2acba18b73def46107c11369

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2014-03-21 15:01:45 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=0b983cb5f69ff05297ce2316f4511bb3911d0c3c

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2014-03-21 15:01:59 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=ef67721bb2357a185c576b82e663f59b9c293591

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2014-03-21 15:02:15 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=6d4b1cf4fb400c52a1407adc1aa1ae335719f4af

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2014-03-21 15:02:29 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=47427ec010d831843a7cd43e1cb051deb3c5a737

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2014-03-21 15:02:44 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=f8aa9509d36c652b00e4c7c827dcdab62a218c56

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 24 Commit Notification 2014-03-21 15:15:31 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=6a97b776ce1d7a6fc454203ece60ab506228d4e1

Related: fdo#67350 test-hid-vs-ui detected typo



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 25 Caolán McNamara 2014-03-21 15:19:10 UTC
ok, so that's pretty cool and loads of bugs found and fixed :-) Which is a really excellent outcome.

A question though, why checkout the git repositories as part of the script rather than operate on a pre-existing one ? I mean what about moving from devtools into core/bin and make it operate on the current repository ? That could enable allowing us to run it during e.g. make check when help is checked out so we would be continuously checking for failures.
Comment 26 Mat M 2014-03-21 22:30:21 UTC
(In reply to comment #25)
> A question though, why checkout the git repositories as part of the script
> rather than operate on a pre-existing one ? I mean what about moving from
> devtools into core/bin and make it operate on the current repository ? That
> could enable allowing us to run it during e.g. make check when help is
> checked out so we would be continuously checking for failures.

You have the --core-repo-dir option to work on local LO repo. Since I did not manage to work in the submodule tree of helpcontent2, I need a help repo (which I initialized as bare, to save space).
I put it in dev-tools, because it is hard to define which script should go into core.

So I can make a patch to core to publish the script, with a default libreoffice core repository as ..

Please confirm
Comment 27 Caolán McNamara 2014-04-17 08:44:15 UTC
that way I could just run it from inside the existing repository and it would "just work" out of the box ?, sure sounds great
Comment 28 Caolán McNamara 2014-04-18 09:55:14 UTC
excellent, all in place and working fine and "all is clean"
Comment 29 Robinson Tryon (qubit) 2015-12-16 05:12:39 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner )
[NinjaEdit]
Comment 30 Robinson Tryon (qubit) 2016-02-18 16:37:19 UTC
Remove LibreOffice Dev List from CC on EasyHacks
(curtailing excessive email to list)
[NinjaEdit]