Documentarian.Vale.Format.ps1xml

<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (c) Microsoft Corporation.
    Licensed under the MIT License.
-->
<Configuration>
    <ViewDefinitions>
        <View>
          <Name>Default</Name>
          <ViewSelectedBy>
            <TypeName>ValeApplicationInfo</TypeName>
          </ViewSelectedBy>
          <TableControl>
            <AutoSize>false</AutoSize>
            <TableHeaders>
              <TableColumnHeader>
                <Label>CommandType</Label>
                <Width>15</Width>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>Name</Label>
                <Width>50</Width>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>Version</Label>
                <Width>10</Width>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>Source</Label>
              </TableColumnHeader>
            </TableHeaders>
            <TableRowEntries>
              <TableRowEntry>
                <TableColumnItems>
                  <TableColumnItem>
                    <PropertyName>CommandType</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>Name</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>Version</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>Source</PropertyName>
                  </TableColumnItem>
                </TableColumnItems>
              </TableRowEntry>
            </TableRowEntries>
          </TableControl>
        </View>
        <View>
          <Name>Default</Name>
          <ViewSelectedBy>
            <TypeName>ValeConfigurationEffective</TypeName>
          </ViewSelectedBy>
          <TableControl>
            <TableHeaders>
              <TableColumnHeader>
                <Label>RootIniPath</Label>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>StylesPath</Label>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>MinimumAlertLevel</Label>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>GlobalBaseStyles</Label>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>Vocabularies</Label>
              </TableColumnHeader>
            </TableHeaders>
            <TableRowEntries>
              <TableRowEntry>
                <TableColumnItems>
                  <TableColumnItem>
                    <PropertyName>RootIniPath</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>StylesPath</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>MinimumAlertLevel</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>GlobalBaseStyles</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>Vocabularies</PropertyName>
                  </TableColumnItem>
                </TableColumnItems>
              </TableRowEntry>
            </TableRowEntries>
          </TableControl>
        </View>
        <View>
          <Name>Default</Name>
          <ViewSelectedBy>
            <TypeName>ValeMetricsInfo</TypeName>
          </ViewSelectedBy>
          <TableControl>
            <TableHeaders>
              <TableColumnHeader>
                <Label>FileInfo</Label>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>WordCount</Label>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>SentenceCount</Label>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>ParagraphCount</Label>
              </TableColumnHeader>
            </TableHeaders>
            <TableRowEntries>
              <TableRowEntry>
                <TableColumnItems>
                  <TableColumnItem>
                    <ScriptBlock>
                                            $Relative = Resolve-Path -Relative -Path $_.FileInfo.FullName
                                            if ($Relative.Length -lt 30) {
                                                return $Relative
                                            }
        
                                            $_.FileInfo.Name
                                        </ScriptBlock>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>WordCount</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>SentenceCount</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>ParagraphCount</PropertyName>
                  </TableColumnItem>
                </TableColumnItems>
              </TableRowEntry>
            </TableRowEntries>
          </TableControl>
        </View>
        <View>
          <Name>Default</Name>
          <ViewSelectedBy>
            <TypeName>ValeReadability</TypeName>
          </ViewSelectedBy>
          <GroupBy>
            <ScriptBlock>
                            $_.Metrics.FileInfo.Directory
                        </ScriptBlock>
            <Label>Directory</Label>
          </GroupBy>
          <TableControl>
            <TableHeaders>
              <TableColumnHeader>
                <Label>Rule</Label>
                <Width>22</Width>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>Score</Label>
                <Width>20</Width>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>Threshold</Label>
                <Width>20</Width>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>File</Label>
                <Width>40</Width>
              </TableColumnHeader>
            </TableHeaders>
            <TableRowEntries>
              <TableRowEntry>
                <TableColumnItems>
                  <TableColumnItem>
                    <PropertyName>Rule</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <ScriptBlock>
                                            if ($_.GradeLevel) {
                                                $_.GradeLevel
                                            } else {
                                                [ValeReadability]::GetRoundedScore($_.Score)
                                            }
                                        </ScriptBlock>
                  </TableColumnItem>
                  <TableColumnItem>
                    <ScriptBlock>
                                            if ($_ -is [ValeMetricsAutomatedReadability]) {
                                                [ValeReadability]::GetGradeLevel($_.Threshold)
                                            } elseif ($_.GradeLevel) {
                                                [ValeReadability]::GetGradeLevel($_.Threshold + 1)
                                            } else {
                                                $_.Threshold
                                            }
                                        </ScriptBlock>
                  </TableColumnItem>
                  <TableColumnItem>
                    <ScriptBlock>
                                            $_.Metrics.FileInfo.Name
                                        </ScriptBlock>
                  </TableColumnItem>
                </TableColumnItems>
              </TableRowEntry>
            </TableRowEntries>
          </TableControl>
        </View>
        <View>
          <Name>Summary</Name>
          <ViewSelectedBy>
            <TypeName>ValeReadability#ProblemMessage</TypeName>
          </ViewSelectedBy>
          <GroupBy>
            <ScriptBlock>
                            $_.Metrics.FileInfo.Directory
                        </ScriptBlock>
            <Label>Directory</Label>
          </GroupBy>
          <TableControl>
            <TableHeaders>
              <TableColumnHeader>
                <Label>Message</Label>
                <Width>90</Width>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>File</Label>
                <Width>40</Width>
              </TableColumnHeader>
            </TableHeaders>
            <TableRowEntries>
              <TableRowEntry>
                <TableColumnItems>
                  <TableColumnItem>
                    <PropertyName>ProblemMessage</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <ScriptBlock>
                                            $_.Metrics.FileInfo.Name
                                        </ScriptBlock>
                  </TableColumnItem>
                </TableColumnItems>
              </TableRowEntry>
            </TableRowEntries>
          </TableControl>
        </View>
        <View>
          <Name>Default</Name>
          <ViewSelectedBy>
            <TypeName>ValeViolationInfo</TypeName>
          </ViewSelectedBy>
          <GroupBy>
            <ScriptBlock>
                            $_.Position.FileInfo.FullName
                        </ScriptBlock>
            <Label>File</Label>
          </GroupBy>
          <TableControl>
            <TableHeaders>
              <TableColumnHeader>
                <Label>RuleName</Label>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>AlertLevel</Label>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>Position</Label>
              </TableColumnHeader>
              <TableColumnHeader>
                <Label>MatchingText</Label>
              </TableColumnHeader>
            </TableHeaders>
            <TableRowEntries>
              <TableRowEntry>
                <TableColumnItems>
                  <TableColumnItem>
                    <PropertyName>RuleName</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>AlertLevel</PropertyName>
                  </TableColumnItem>
                  <TableColumnItem>
                    <ScriptBlock>
                                            $_.Position.ToRelativeString()
                                        </ScriptBlock>
                  </TableColumnItem>
                  <TableColumnItem>
                    <PropertyName>MatchingText</PropertyName>
                  </TableColumnItem>
                </TableColumnItems>
              </TableRowEntry>
            </TableRowEntries>
          </TableControl>
        </View>
    </ViewDefinitions>
</Configuration>