PowerShell / PowerShell/PSScriptAnalyzer

Add setting to better toggle block comments

Ouverte
#1,428 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Area - Formatter Issue - New Rule Up-for-Grabs
Langage dominant
C#
Étoiles
2.2k
Forks
414
Merge moyen
13 h 1 min
PR mergées (30 j)
2

Description

Force block comment start (<#) and end (#>) to be on their own line and indent contents

When toggling a block comment the contents are not indented and if white space was not selected the start and end tags will not be on their own lines.
I propose a setting (or two) that would force a newline for the start and end tags and possibly indent the contents. This way when someone goes to toggle block comment it would already be pretty inline with outlined in https://github.com/PoshCode/PowerShellPracticeAndStyle.

Perhaps a dropdown with block comment style similar to the pipeline indentation style option.

I would like that when you toggle block comment that it matches the definition in https://github.com/PoshCode/PowerShellPracticeAndStyle/blob/master/Style-Guide/Documentation-and-Comments.md
This is to say the start and end tags on their own lines and the content indented once.

Appreciate any consideration to add this!

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par localiser l’implémentation de la bascule des commentaires de bloc et le paramètre existant de style d’indentation des pipelines dans PSScriptAnalyzer. Comparez le comportement actuel avec les recommandations liées de PowerShellPracticeAndStyle. Le travail est considéré comme terminé lorsque le ou les paramètres choisis placent <# et #> sur leurs propres lignes et indentent le contenu du bloc lorsque les commentaires sont basculés.

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é
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.