Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Insert blank lines before/after single-line fields #433

Closed
Cophla opened this issue Apr 13, 2017 · 4 comments
Closed

Feature Request: Insert blank lines before/after single-line fields #433

Cophla opened this issue Apr 13, 2017 · 4 comments

Comments

@Cophla
Copy link

Cophla commented Apr 13, 2017

Environment

  • 2017 Community]
  • 10.3
  • C#

Description

i want to remove any blank line between class fields or force inserting a blank line between class fields

public class TblSurveyCustomer : AGSurveyDb<int>
{
		#region Private Fields

		private static int _listCount = 100; // Code Maid Is Not Adding New Line OR
		private short _countryId; // Removing Blank Lines Between Private Fields

		private string _customerAddress;

		private DateTime _dateAdded;

		private DateTime _dateOfBelonging;

		private DateTime _dateOfBirth;

                #region Private Fields
}

Steps to recreate

  1. Mainly With Default Settings

Current behavior

Some class fields have new line between and some with no blank line between

Expected behavior

Force blank line or force remove blank line

@codecadwallader
Copy link
Owner

Thanks for the suggestion. We do not currently have a configuration for inserting/removing blank lines on single line fields. We do have configuration options for inserting blank lines between multi-line fields (e.g. those with leading comments).

@codecadwallader
Copy link
Owner

The relevant code for anyone interested in pursuing:

https://github.com/codecadwallader/codemaid/blob/master/CodeMaid/Logic/Cleaning/InsertBlankLinePaddingLogic.cs#L79

https://github.com/codecadwallader/codemaid/blob/master/CodeMaid/Logic/Cleaning/InsertBlankLinePaddingLogic.cs#L140

This should be a very straight forward clone of the logic for single-line properties vs. multi-line properties. Similar to single-line properties, it should be off by default in configuration.

@Cophla
Copy link
Author

Cophla commented Apr 14, 2017

Thanks,
Best wishes and more progress in good

@Cophla Cophla closed this as completed Apr 14, 2017
@codecadwallader codecadwallader changed the title How to Remove Blank Line or Force to insert Blank Line For All Fields Feature Request: Insert blank lines before/after single-line fields Apr 14, 2017
@codecadwallader
Copy link
Owner

Thanks, I appreciate it. Lets leave this open (edited title) as a feature request for anyone interested in running with it. It would be a great warming up activity for someone new.

jasonjtyler added a commit to jasonjtyler/codemaid that referenced this issue Oct 24, 2018
Fixes codecadwallader#433

Modify field case to account for single line cases.
jasonjtyler added a commit to jasonjtyler/codemaid that referenced this issue Oct 24, 2018
Fixes codecadwallader#433

Add "single-line fields" option to the cleaning insert options view and view model.
codecadwallader added a commit that referenced this issue Oct 28, 2018
…ields

Feature Request: Insert blank lines before/after single-line fields, fixes #433
@codecadwallader codecadwallader added this to the v10.6 milestone Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants