From a69330260bd380734ff3deb8de457010ca50d7f1 Mon Sep 17 00:00:00 2001 From: Peter Villadsen Date: Sun, 7 Mar 2021 15:49:28 -0800 Subject: [PATCH] Added new rule for non private query fields. --- Sample rules/X++/NonPrivateQueryFields.xq | 19 +++++++++++++++++++ .../Explorer/Properties/Settings.Designer.cs | 2 +- .../Explorer/Socratex Explorer.netcore.csproj | 13 +++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Sample rules/X++/NonPrivateQueryFields.xq diff --git a/Sample rules/X++/NonPrivateQueryFields.xq b/Sample rules/X++/NonPrivateQueryFields.xq new file mode 100644 index 0000000..b67de70 --- /dev/null +++ b/Sample rules/X++/NonPrivateQueryFields.xq @@ -0,0 +1,19 @@ +(: Copyright (c) Microsoft Corporation. + Licensed under the MIT license. :) + +(: Find references to query fields that are not private. Query fields + cannot be addressed from outside, since it is not possible to derive + from queries ir access query fields from outside the query. +:) +(: @Language Xpp :) +(: @Category Informational :) + + +{ + for $query in /Query + for $field in $query/Class/FieldDeclaration[@IsPrivate='false'] + return +} + \ No newline at end of file diff --git a/tools/Explorer/Properties/Settings.Designer.cs b/tools/Explorer/Properties/Settings.Designer.cs index 2aa6353..be05d14 100644 --- a/tools/Explorer/Properties/Settings.Designer.cs +++ b/tools/Explorer/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace XppReasoningWpf.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/tools/Explorer/Socratex Explorer.netcore.csproj b/tools/Explorer/Socratex Explorer.netcore.csproj index 2cf43b8..d897b7a 100644 --- a/tools/Explorer/Socratex Explorer.netcore.csproj +++ b/tools/Explorer/Socratex Explorer.netcore.csproj @@ -85,4 +85,17 @@ + + + True + True + Settings.settings + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + \ No newline at end of file