Skip to content

Commit

Permalink
Merge branch 'main' into VS2022-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlacey committed Feb 10, 2025
2 parents 1f8284f + bdaf47d commit 32edeed
Show file tree
Hide file tree
Showing 19 changed files with 174 additions and 35 deletions.
8 changes: 8 additions & 0 deletions .404-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
folder: docs/ # The folder required to be parsed
httpsOnly: true # enforce only HTTPS links
pullRequestReview: true # If you want a nice review in your pull requests
ignore:
urls:
- https://example.com
files:
- docs/warnings/_template.md
15 changes: 8 additions & 7 deletions .github/workflows/doc-link-checks.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: 404 links
name: 404 link checks


on: [push]
on:
push:
branches: [ main ]
pull_request:
types: [assigned, opened, synchronize, reopened]

jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: 'restqa-404-links'
uses: restqa/[email protected]
with:
path: 'docs'
uses: restqa/[email protected]
14 changes: 14 additions & 0 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Markdownlint Action
on: push

jobs:
build:
name: Markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: nosborn/[email protected]
name: Markdownlint
with:
files: .
config_file: "config/.markdownlint.json"
21 changes: 21 additions & 0 deletions .github/workflows/spellchecking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Spellcheck Action
on: push

jobs:
build:
name: Spellcheck
runs-on: ubuntu-latest
steps:
# The checkout step
- uses: actions/checkout@v3
- uses: rojopolis/[email protected]
name: Spellcheck
with:
config_path: config/.spellcheck.yml
task_name: Markdown
output_file: spellcheck-output.txt
- uses: actions/upload-artifact@v4
if: '!cancelled()' # Do not upload artifact if job was cancelled
with:
name: Spellcheck Output
path: spellcheck-output.txt
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ __pycache__/
*.xsd.cs
*.secret

#Rider
Rider/.gradle/
Rider/Build/

# The following have default versions checked in but are always assummed as unchanged
VSIX/RapidXamlToolkit.Tests.Manual/XamlAnalysis/ParseRealDocumentsTests.g.cs
VSIX/RapidXamlToolkit.Tests.Manual/Parsers/ParseRealDocumentsTests.g.cs
Expand Down
8 changes: 4 additions & 4 deletions Assets/Marketplace/entry.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- **Categories** - Coding, Other, Scaffolding
- **Tags** - XAML, UWP, WPF, Xamarin.Forms, MVVM, Xamarin
- **Pricing Category** - Free
- **Source code repository** - https://github.com/microsoft/rapid-xaml-toolkit
- **Source code repository** - https://github.com/mrlacey/rapid-xaml-toolkit
- **Allow Q&A for your extension** - True

---
Expand Down Expand Up @@ -61,14 +61,14 @@ and generate this
</StackPanel>
```

What is generated is based on common conventions but is highly [configurable](https://github.com/microsoft/Rapid-XAML-Toolkit/blob/dev/docs/configuration.md) and with multiple profiles provided by default.
What is generated is based on common conventions but is highly [configurable](https://github.com/mrlacey/Rapid-XAML-Toolkit/blob/main/docs/configuration.md) and with multiple profiles provided by default.

## XAML Analysis

Like [Roslyn Analyzers](https://docs.microsoft.com/en-us/visualstudio/code-quality/roslyn-analyzers-overview?view=vs-2019) do for C# and VB&#183;Net, this toolkit can identify potential issues in XAML files and create suggestions, warnings, or errors about the problems. Suggested Actions are also provided to easily fix what is found.

![Screenshot showing some of the issues that analysis can find](https://github.com/microsoft/Rapid-XAML-Toolkit/blob/dev/docs/Assets/xaml-analysis-example.png?raw=true)
![Screenshot showing some of the issues that analysis can find](https://github.com/mrlacey/Rapid-XAML-Toolkit/blob/main/docs/Assets/xaml-analysis-example.png?raw=true)

## Get Involved

[Feedback](https://github.com/microsoft/Rapid-XAML-Toolkit/issues/new/choose) and [contributions](https://github.com/microsoft/Rapid-XAML-Toolkit/blob/dev/CONTRIBUTING.md) welcome.
[Feedback](https://github.com/mrlacey/Rapid-XAML-Toolkit/issues/new/choose) and [contributions](https://github.com/mrlacey/Rapid-XAML-Toolkit/blob/main/CONTRIBUTING.md) welcome.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

---

_earlier release notes are summary only_
Note: _earlier release notes are summary only_

## 0.10.*

Expand All @@ -105,9 +105,9 @@ _earlier release notes are summary only_

## 0.3.*

- First version available via the marketplace.
- Included latest developements in Generation and Analysis.
- Added Rsolyn ANalyzers for C#.
- First version available via the marketplace.
- Included latest developments in Generation and Analysis.
- Added Roslyn Analyzers for C#.

## 0.2.*

Expand Down
1 change: 0 additions & 1 deletion CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

4 changes: 3 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
please see the [change log](https://github.com/mrlacey/Rapid-XAML-Toolkit/blob/main/CHANGELOG.md)
# Release Notes

Please see the [change log](https://github.com/mrlacey/Rapid-XAML-Toolkit/blob/main/CHANGELOG.md)
10 changes: 3 additions & 7 deletions VSIX/Benchmarking/historic-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Because any changes can be far reaching, it is not practical to keep all different implementations for comparison.
Instead, a copy of the results is kept for comparison with current results.

A benchamarking run involves parsing the five documents in the `files` folder.
A benchmarking run involves parsing the five documents in the `files` folder.
This includes analysis with all default/included analyzers and so performance may suffer as more analyzers are included. However, the ability to monitor this will help identify the impact of adding new analyzers.

Run should be done of a release build without the debugger attached.
Expand All @@ -21,13 +21,11 @@ Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical c
[Host] : .NET Core 3.1.8 (CoreCLR 4.700.20.41105, CoreFX 4.700.20.41903), X64 RyuJIT
DefaultJob : .NET Core 3.1.8 (CoreCLR 4.700.20.41105, CoreFX 4.700.20.41903), X64 RyuJIT
| Method | Mean | Error | StdDev | Ratio | Rank | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------------- |---------:|---------:|---------:|------:|-----:|----------:|----------:|---------:|----------:|
| ParseCurrent | 62.49 ms | 0.898 ms | 0.701 ms | 1.00 | 1 | 8000.0000 | 1125.0000 | 500.0000 | 33.9 MB |
```


## 0.10.5 (initial perf improvements)

Summary results
Expand All @@ -39,7 +37,6 @@ Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical c
[Host] : .NET Core 3.1.6 (CoreCLR 4.700.20.26901, CoreFX 4.700.20.31603), X64 RyuJIT
DefaultJob : .NET Core 3.1.6 (CoreCLR 4.700.20.26901, CoreFX 4.700.20.31603), X64 RyuJIT
| Method | Mean | Error | StdDev | Ratio | Rank | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------------- |---------:|---------:|---------:|------:|-----:|-----------:|----------:|------:|----------:|
| ParseCurrent | 230.9 ms | 12.24 ms | 34.53 ms | 1.00 | 1 | 11000.0000 | 2000.0000 | - | 47.93 MB |
Expand All @@ -56,13 +53,12 @@ Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical c
[Host] : .NET Core 3.1.6 (CoreCLR 4.700.20.26901, CoreFX 4.700.20.31603), X64 RyuJIT
DefaultJob : .NET Core 3.1.6 (CoreCLR 4.700.20.26901, CoreFX 4.700.20.31603), X64 RyuJIT
| Method | Mean | Error | StdDev | Ratio | Rank | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------------- |---------:|---------:|---------:|------:|-----:|-----------:|----------:|------:|----------:|
| ParseCurrent | 426.9 ms | 18.65 ms | 53.51 ms | 1.00 | 1 | 18000.0000 | 2000.0000 | - | 79.86 MB |
```

**Notes.**
**Notes.**

- Mean is better than expected.
- Allocated memory is worryingly large.

6 changes: 6 additions & 0 deletions config/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"default": true,
"line-length": false,
"commands-show-output": false,
"no-bare-urls": false
}
20 changes: 20 additions & 0 deletions config/.spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
matrix:
- name: Markdown
sources:
- 'docs/*.md'
default_encoding: utf-8
aspell:
lang: en
dictionary:
wordlists:
- config/wordlist.txt
encoding: utf-8
pipeline:
- pyspelling.filters.markdown:
markdown_extensions:
- pymdownx.superfences
- pyspelling.filters.html:
comments: false
ignores:
- code
- pre
68 changes: 68 additions & 0 deletions config/wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
AddMissingBarAttribute
AnalysisExe
arg
AutoFix
BuildAnalysis
camelCase
Ctrl
codebase
DependencyObject
dialogs
dll
DynamicResource
ElementIdentifier
elementwithspace
elementwithspaces
enum
enumname
errorcode
ErrorType
FallBack
FileName
incint
intellicode
IntelliCode
JSON
MAUI
mrlacey
MVVM
MyGet
namespace
namewithspaces
nooutput
NuGet
nupkg
PascalCase
pfx
precompiled
PropertyName
RapidXaml
RapidXamlToolkit
repint
repxname
RXT
safename
SDK
sln
subprops
suppressions
TagErrorCode
TargetType
TODO
UI
UWP
UIElement
ViewModel
VM
vsix
VSIX
WarnAboutTODOs
WinUI
WPF
xaml
XAML
XamlAnalysisFooElementRequiresBarAttributeDescription
XamlAnalysisFooElementRequiresBarAttributeToolTip
xml
xmlns
xname
6 changes: 3 additions & 3 deletions docs/configuring-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ The issues reported via XAML Analysis have a default ErrorType ('Error', 'Warnin

The ErrorType of a tag determines how it is displayed in Visual Studio.

- **Error** is underlined in code and listed in the 'Errorw' tab in the Error List.
- **Warning** is underlined in code and listed in the 'Warningw' tab in the Error List.
- **Error** is underlined in code and listed in the 'Errors' tab in the Error List.
- **Warning** is underlined in code and listed in the 'Warnings' tab in the Error List.
- **Suggestion** is underlined in code and listed in the 'Messages' tab in the Error List.
- **Hidden** has an underline hint in code and is not included in the Error List.

Expand Down Expand Up @@ -43,7 +43,7 @@ The file must contain a JSON formatted list of suppression objects.
Each object is made up of:

- **FileName** [required] Matching is case sensitive and done from the end of a full file path. No wildcards are supported but you can specify the FileName as '.xaml' for it to be applied to all XAML files.
- **TagErrorCode** [optional] The warnign to suppress. If not specified the suppression will apply to all tags in the file.
- **TagErrorCode** [optional] The warning to suppress. If not specified the suppression will apply to all tags in the file.
- **ElementIdentifier** [optional] Used in a `Contains()` match on the full text of the element, and only those that match are suppressed. If not specified (or left blank) then all tags with the errorcode in the specified file will be suppressed.
- **Reason** [optional] Nothing is done with this, it's simply a place to justify why the suppression has been added and allows developers to tell their future selves, or others working on the project, why they did this.

Expand Down
4 changes: 2 additions & 2 deletions docs/custom-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ You can reference the project directly, the compiled DLL, or package the library

The generated project also includes example tests to help you verify your analyzer is work correctly. They show how you can confirm the analyzer returns the expected response given different XAML strings as input.

### Please note.
### Please note

While testing your newly developed custom analyzers, you may find that changes you make aren't always immediately showing up.
A possible cause for this can be Visual Studio aggressively caching previoulsy generated and loaded assemblies. To work around this, try: cleaning the whole solution; manually deleting the 'bin' and 'obj' directories; and even restarting VS.
A possible cause for this can be Visual Studio aggressively caching previously generated and loaded assemblies. To work around this, try: cleaning the whole solution; manually deleting the 'bin' and 'obj' directories; and even restarting VS.
I recognize this can be frustrating but I haven't yet found a better solution. If you find one, please share it.

## Share your experiences
Expand Down
2 changes: 1 addition & 1 deletion docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The image below shows some of the issues that analysis can find (and fix).

See the [full list of all warnings](./warnings/readme.md#rapid-xaml-toolkit---warnings).

Additionaly, it's also possible to:
Additionally, it's also possible to:

- Right-click anywhere in a XAML source file and select 'Rapid XAML > Move all hard-coded string to Resource file' to move all hard-coded strings to a resource file.
- Right-click on an opening `Grid` tag and easily add Row and Column definitions.
Expand Down
6 changes: 3 additions & 3 deletions docs/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Only **$name$**, **$incint$**, and **$repint$** placeholders are valid in the su
#### Enum Members mapping

The mapping used for properties included from the **$members$** placeholder.
Only the **$element$**, **$elementwithspace$** and **$enumname$** placeholders are valid in the enum member output.
Only the **$element$**, **$elementwithspaces$** and **$enumname$** placeholders are valid in the enum member output.

## Placeholders

Expand Down Expand Up @@ -97,7 +97,7 @@ Attribute based placeholders take the form `$att:<attribute-name>:<output-if-att

#### &lt;attribute-name&gt;

This is the name of the attribute to look for. In the following code snippet this woudl be `Display`. (Use of `DisplayAttribute` also works.)
This is the name of the attribute to look for. In the following code snippet this would be `Display`. (Use of `DisplayAttribute` also works.)

```csharp
[Display(Name = ShortName)]
Expand All @@ -108,7 +108,7 @@ This is the name of the attribute to look for. In the following code snippet thi

These can be regular strings to treat as XAML. It can also include values in square brackets which have special meaning with regard the properties of the attribute.

- **[PropertName]** can be used to access the values of named items passed to the attribute constructor. e.g. `Name` in the above example.
- **[PropertyName]** can be used to access the values of named items passed to the attribute constructor. e.g. `Name` in the above example.
- **[1]** can be used to access values passed to the attribute constructor in numeric order. Order starts with '1'. (`[1]` and `[Name]` produce the same output in the above example.)

#### &lt;fallback-value&gt;
Expand Down
2 changes: 1 addition & 1 deletion docs/warnings/RXT102.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ After additional column definitions have been added, you may need to adjust thei
See also

- [RXT101 - Use of a Grid.Row value without corresponding RowDefinition](./RXT101.md)
- [RXT104 - Use of a Grid.ColumnSpan value without corresponding ColumnDefinition](./RXT104.md)
- [RXT104 - Use of a Grid.ColumnSpan value without corresponding ColumnDefinition](./RXT104.md)
2 changes: 1 addition & 1 deletion docs/warnings/_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@

See also

- [](https://)
- [](https://example.com)

0 comments on commit 32edeed

Please sign in to comment.