Skip to content

Commit e716f9c

Browse files
committed
SimpleDisplay: Hide non-relevants errors for 'or' policies
Signed-off-by: Maxime Gervais <[email protected]>
1 parent f439ab2 commit e716f9c

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.github/workflows/MediaConch_Checks.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
PYTHONPATH: /usr/local/lib/python2.7:/usr/local/lib/python2.7/dist-packages:/usr/local/lib/python2.7/site-packages
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 1
1919
- name: Dependencies
@@ -26,17 +26,17 @@ jobs:
2626
pip --disable-pip-version-check install git+https://github.com/vi/mkvparse.git
2727
fi
2828
if [ "$RUNNER_OS" == "macOS" ]; then
29-
brew install libtool automake libxslt sqlite jansson libevent qt@5 sfk xmlstarlet ffmpeg
29+
brew install libtool automake libxslt jansson qt@5 sfk xmlstarlet ffmpeg
3030
sudo pip --disable-pip-version-check install --prefix /usr/local git+https://github.com/vi/mkvparse.git
3131
fi
3232
- name: Get ZenLib info
3333
id: zenlib-info
3434
run: |
35-
echo "::set-output name=hash::$(git ls-remote https://github.com/MediaArea/ZenLib.git HEAD | cut -f1)"
36-
echo "::set-output name=path::$(dirname $PWD)/ZenLib"
35+
echo "hash=$(git ls-remote https://github.com/MediaArea/ZenLib.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
36+
echo "path=$(dirname $PWD)/ZenLib" >> $GITHUB_OUTPUT
3737
- name: ZenLib cache
3838
id: zenlib-cache
39-
uses: actions/cache@v2
39+
uses: actions/cache@v4
4040
with:
4141
path: ${{ steps.zenlib-info.outputs.path }}
4242
key: ${{ runner.os }}-ZenLib-${{ steps.zenlib-info.outputs.hash }}
@@ -52,11 +52,11 @@ jobs:
5252
- name: Get MediaInfoLib info
5353
id: mediainfolib-info
5454
run: |
55-
echo "::set-output name=hash::$(git ls-remote https://github.com/MediaArea/MediaInfoLib.git HEAD | cut -f1)"
56-
echo "::set-output name=path::$(dirname $PWD)/MediaInfoLib"
55+
echo "hash=$(git ls-remote https://github.com/MediaArea/MediaInfoLib.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
56+
echo "path=$(dirname $PWD)/MediaInfoLib" >> $GITHUB_OUTPUT
5757
- name: MediaInfoLib cache
5858
id: mediainfolib-cache
59-
uses: actions/cache@v2
59+
uses: actions/cache@v4
6060
with:
6161
path: ${{ steps.mediainfolib-info.outputs.path }}
6262
key: ${{ runner.os }}-MediaInfoLib-${{ steps.mediainfolib-info.outputs.hash }}

Source/Common/generated/ImplementationReportDisplaySimpleXsl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const char implementation_report_display_simple_xsl[] = {
138138
,'\x0a'
139139
,'\x20','\x20','\x3c','\x78','\x73','\x6c','\x3a','\x74','\x65','\x6d','\x70','\x6c','\x61','\x74','\x65','\x20','\x6d','\x61','\x74','\x63','\x68','\x3d','\x22','\x6d','\x63','\x3a','\x70','\x6f','\x6c','\x69','\x63','\x79','\x7c','\x6d','\x63','\x3a','\x72','\x75','\x6c','\x65','\x22','\x3e','\x0d'
140140
,'\x0a'
141-
,'\x20','\x20','\x20','\x20','\x3c','\x78','\x73','\x6c','\x3a','\x69','\x66','\x20','\x74','\x65','\x73','\x74','\x3d','\x22','\x40','\x6f','\x75','\x74','\x63','\x6f','\x6d','\x65','\x21','\x3d','\x27','\x70','\x61','\x73','\x73','\x27','\x20','\x6f','\x72','\x20','\x64','\x65','\x73','\x63','\x65','\x6e','\x64','\x61','\x6e','\x74','\x3a','\x3a','\x2a','\x5b','\x40','\x6f','\x75','\x74','\x63','\x6f','\x6d','\x65','\x21','\x3d','\x27','\x70','\x61','\x73','\x73','\x27','\x5d','\x22','\x3e','\x0d'
141+
,'\x20','\x20','\x20','\x20','\x3c','\x78','\x73','\x6c','\x3a','\x69','\x66','\x20','\x74','\x65','\x73','\x74','\x3d','\x22','\x28','\x6e','\x61','\x6d','\x65','\x28','\x2e','\x2e','\x29','\x21','\x3d','\x27','\x70','\x6f','\x6c','\x69','\x63','\x79','\x27','\x20','\x61','\x6e','\x64','\x20','\x40','\x6f','\x75','\x74','\x63','\x6f','\x6d','\x65','\x21','\x3d','\x27','\x70','\x61','\x73','\x73','\x27','\x29','\x20','\x6f','\x72','\x20','\x28','\x6e','\x61','\x6d','\x65','\x28','\x2e','\x2e','\x29','\x3d','\x27','\x70','\x6f','\x6c','\x69','\x63','\x79','\x27','\x20','\x61','\x6e','\x64','\x20','\x2e','\x2e','\x2f','\x40','\x74','\x79','\x70','\x65','\x3d','\x27','\x6f','\x72','\x27','\x20','\x61','\x6e','\x64','\x20','\x2e','\x2e','\x2f','\x40','\x6f','\x75','\x74','\x63','\x6f','\x6d','\x65','\x21','\x3d','\x27','\x70','\x61','\x73','\x73','\x27','\x20','\x61','\x6e','\x64','\x20','\x40','\x6f','\x75','\x74','\x63','\x6f','\x6d','\x65','\x3d','\x2e','\x2e','\x2f','\x40','\x6f','\x75','\x74','\x63','\x6f','\x6d','\x65','\x29','\x20','\x6f','\x72','\x20','\x28','\x6e','\x61','\x6d','\x65','\x28','\x2e','\x2e','\x29','\x3d','\x27','\x70','\x6f','\x6c','\x69','\x63','\x79','\x27','\x20','\x61','\x6e','\x64','\x20','\x2e','\x2e','\x2f','\x40','\x74','\x79','\x70','\x65','\x21','\x3d','\x27','\x6f','\x72','\x27','\x20','\x61','\x6e','\x64','\x20','\x40','\x6f','\x75','\x74','\x63','\x6f','\x6d','\x65','\x21','\x3d','\x27','\x70','\x61','\x73','\x73','\x27','\x29','\x22','\x3e','\x0d'
142142
,'\x0a'
143143
,'\x20','\x20','\x20','\x20','\x20','\x20','\x3c','\x78','\x73','\x6c','\x3a','\x74','\x65','\x78','\x74','\x3e','\x26','\x23','\x78','\x61','\x3b','\x3c','\x2f','\x78','\x73','\x6c','\x3a','\x74','\x65','\x78','\x74','\x3e','\x0d'
144144
,'\x0a'
@@ -158,7 +158,7 @@ const char implementation_report_display_simple_xsl[] = {
158158
,'\x0a'
159159
,'\x20','\x20','\x20','\x20','\x20','\x20','\x3c','\x78','\x73','\x6c','\x3a','\x74','\x65','\x78','\x74','\x3e','\x5d','\x3c','\x2f','\x78','\x73','\x6c','\x3a','\x74','\x65','\x78','\x74','\x3e','\x0d'
160160
,'\x0a'
161-
,'\x20','\x20','\x20','\x20','\x20','\x20','\x3c','\x78','\x73','\x6c','\x3a','\x61','\x70','\x70','\x6c','\x79','\x2d','\x74','\x65','\x6d','\x70','\x6c','\x61','\x74','\x65','\x73','\x20','\x73','\x65','\x6c','\x65','\x63','\x74','\x3d','\x22','\x6d','\x63','\x3a','\x72','\x75','\x6c','\x65','\x5b','\x40','\x6f','\x75','\x74','\x63','\x6f','\x6d','\x65','\x21','\x3d','\x27','\x70','\x61','\x73','\x73','\x27','\x5d','\x7c','\x6d','\x63','\x3a','\x70','\x6f','\x6c','\x69','\x63','\x79','\x5b','\x40','\x6f','\x75','\x74','\x63','\x6f','\x6d','\x65','\x21','\x3d','\x27','\x70','\x61','\x73','\x73','\x27','\x5d','\x7c','\x64','\x65','\x73','\x63','\x65','\x6e','\x64','\x61','\x6e','\x74','\x3a','\x3a','\x2a','\x5b','\x40','\x6f','\x75','\x74','\x63','\x6f','\x6d','\x65','\x21','\x3d','\x27','\x70','\x61','\x73','\x73','\x27','\x5d','\x22','\x2f','\x3e','\x0d'
161+
,'\x20','\x20','\x20','\x20','\x20','\x20','\x3c','\x78','\x73','\x6c','\x3a','\x61','\x70','\x70','\x6c','\x79','\x2d','\x74','\x65','\x6d','\x70','\x6c','\x61','\x74','\x65','\x73','\x20','\x73','\x65','\x6c','\x65','\x63','\x74','\x3d','\x22','\x6d','\x63','\x3a','\x70','\x6f','\x6c','\x69','\x63','\x79','\x7c','\x6d','\x63','\x3a','\x72','\x75','\x6c','\x65','\x22','\x2f','\x3e','\x0d'
162162
,'\x0a'
163163
,'\x20','\x20','\x20','\x20','\x3c','\x2f','\x78','\x73','\x6c','\x3a','\x69','\x66','\x3e','\x0d'
164164
,'\x0a'

Source/Resource/displays/MediaConchSimple.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
</xsl:for-each>
6363
</xsl:template>
6464
<xsl:template match="mc:policy|mc:rule">
65-
<xsl:if test="@outcome!='pass' or descendant::*[@outcome!='pass']">
65+
<xsl:if test="(name(..)!='policy' and @outcome!='pass') or (name(..)='policy' and ../@type='or' and ../@outcome!='pass' and @outcome=../@outcome) or (name(..)='policy' and ../@type!='or' and @outcome!='pass')">
6666
<xsl:text>&#xa;</xsl:text>
6767
<xsl:text> </xsl:text>
6868
<xsl:text> --</xsl:text>
@@ -72,7 +72,7 @@
7272
<xsl:text>:</xsl:text>
7373
<xsl:value-of select="@name"/>
7474
<xsl:text>]</xsl:text>
75-
<xsl:apply-templates select="mc:rule[@outcome!='pass']|mc:policy[@outcome!='pass']|descendant::*[@outcome!='pass']"/>
75+
<xsl:apply-templates select="mc:policy|mc:rule"/>
7676
</xsl:if>
7777
</xsl:template>
7878
</xsl:stylesheet>

0 commit comments

Comments
 (0)