Coder Social home page Coder Social logo

Comments (9)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
I agree that empty lines should not be indented. I had to tweak the Jdom 
library to support empty lines, and it is not obvious how to remove the 
indentation. Will look into this as soon as possible.

Original comment by [email protected] on 7 Jun 2012 at 6:07

  • Changed state: Accepted

from sortpom.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
Are you really sure that the indentation for blank lines should be 
configurable? I think they should never be indented.

Created a new version where the empty lines doesn't have indentation. Please 
verify that it works for you before I deploy it to Central.
Download the source from subversion and compile with
mvn clean install -Ddev
and run the plugin with 
mvn com.google.code.sortpom:maven-sortpom-plugin:1.3.1-SNAPSHOT:sort 
-Dsort.keepBlankLines=true

Regards /Björn

Original comment by [email protected] on 7 Jun 2012 at 11:52

  • Changed state: Fixed

from sortpom.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024

Original comment by [email protected] on 7 Jun 2012 at 11:52

  • Changed state: Started

from sortpom.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
Indeed, the changes seem to work.

I suggested configurability because I'm not sure if truncating whitespace of 
empty lines is globally agreed best practice. Some might want to retain the 
whitespace.

You could turn the approach around and have whitespace removed by default. 
Maybe allow configuring the behavior with truncateEmptyLines property?

Original comment by [email protected] on 10 Jun 2012 at 11:40

from sortpom.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
Good suggestion! I'll add the new property and have whitespace removed by 
default.

Original comment by [email protected] on 10 Jun 2012 at 6:18

from sortpom.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
Created a new version where the indentation of the blank lines is configurable. 
Default is that blank lines don't have indentation.
Can you please verify this version before I deploy it to Central.

Download the source from subversion and compile with
mvn clean install -Ddev
and run the plugin with 
mvn com.google.code.sortpom:maven-sortpom-plugin:1.3.1-SNAPSHOT:sort 
-Dsort.keepBlankLines=true -Dsort.indentBlankLines=(true|false)

Original comment by [email protected] on 12 Jun 2012 at 7:47

from sortpom.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
Verified, works correctly. I think you are safe to publish :)

Original comment by [email protected] on 17 Jun 2012 at 6:19

from sortpom.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
Thank for testing! It should reach Central any time now.

Original comment by [email protected] on 17 Jun 2012 at 9:20

  • Changed state: Verified

from sortpom.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024

Original comment by [email protected] on 1 May 2014 at 8:38

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from sortpom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.