PowerShell / PowerShell/PSScriptAnalyzer
Rule request: Avoid enclosing strings with smart quotes
Personne n'a encore pris cette issue.
- Langage dominant
- C#
- Étoiles
- 2.2k
- Forks
- 414
- Merge moyen
- 13 h 1 min
- PR mergées (30 j)
- 2
Description
Background (excerpt from Wikipedea Quotation mark definition):
Regarding their appearance, there are two types of quotation marks:
- '…' and "…" are known as neutral, vertical, straight, typewriter, dumb, or ASCII quotation marks. The left and right marks are identical. These are found on typical English typewriters and computer keyboards, although they are sometimes automatically converted to the other type by software.
- ‘…’ and “…” are known as typographic, curly, curved, book, or smart quotation marks...
Summary of the new feature
Quoted strings are sometimes unintendedly replaced when passed by word processors as Microsoft Office applications as MSWord and Outlook. It is recommended to surround strings with unambiguous single quoted or double quoted string as it unnecessary triggers the UseBOMForUnicodeEncodedFile rule with no clear indication of the location.
Proposed technical implementation details (optional)
See (PowerShell based) prototype AvoidSmartQuotedString at: https://github.com/iRon7/PSRules
What is the latest version of PSScriptAnalyzer at the point of writing
1.21.0
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par lire le prototype AvoidSmartQuotedString dans PSRules et la documentation existante de la règle UseBOMForUnicodeEncodedFile dans PSScriptAnalyzer. Déterminez comment une nouvelle règle d’analyse est structurée et testée, puis définissez l’achèvement de manière à détecter les chaînes entourées de guillemets typographiques involontaires sans produire d’avertissement BOM trompeur.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- csharp, powershell
- Domaine
- tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100