Skip to main content
replaced http://meta.stackexchange.com/ with https://meta.stackexchange.com/
Source Link

It's generally accepted that you shouldn't do any more than

  • formatting into a markdown code block

  • if you're feeling generous, removing cruft like rogue tabs and making sure the code all lines up nicely (whilst honouring the OP's brace style)

  • where the language allows statements over multiple lines, adding a carriage return (and where required a line continuation character) here and there to reduce horizontal scroll.

  • removing excessive carriage returns between lines of code

Changing code style would be off-limits, as would doing things like turning (using C# as an example):

List<Thing> things = repo.GetThings()

into

var things = repo.GetThings()

Because now you're no longer working with the same code the OP is trying to debug.

See also:

httphttps://meta.stackexchange.com/questions/101583/when-is-it-appropriate-to-edit-someone-elses-code

httphttps://meta.stackexchange.com/questions/88627/how-far-can-i-refactor-someone-elses-code -

It's generally accepted that you shouldn't do any more than

  • formatting into a markdown code block

  • if you're feeling generous, removing cruft like rogue tabs and making sure the code all lines up nicely (whilst honouring the OP's brace style)

  • where the language allows statements over multiple lines, adding a carriage return (and where required a line continuation character) here and there to reduce horizontal scroll.

  • removing excessive carriage returns between lines of code

Changing code style would be off-limits, as would doing things like turning (using C# as an example):

List<Thing> things = repo.GetThings()

into

var things = repo.GetThings()

Because now you're no longer working with the same code the OP is trying to debug.

See also:

http://meta.stackexchange.com/questions/101583/when-is-it-appropriate-to-edit-someone-elses-code

http://meta.stackexchange.com/questions/88627/how-far-can-i-refactor-someone-elses-code -

It's generally accepted that you shouldn't do any more than

  • formatting into a markdown code block

  • if you're feeling generous, removing cruft like rogue tabs and making sure the code all lines up nicely (whilst honouring the OP's brace style)

  • where the language allows statements over multiple lines, adding a carriage return (and where required a line continuation character) here and there to reduce horizontal scroll.

  • removing excessive carriage returns between lines of code

Changing code style would be off-limits, as would doing things like turning (using C# as an example):

List<Thing> things = repo.GetThings()

into

var things = repo.GetThings()

Because now you're no longer working with the same code the OP is trying to debug.

See also:

https://meta.stackexchange.com/questions/101583/when-is-it-appropriate-to-edit-someone-elses-code

https://meta.stackexchange.com/questions/88627/how-far-can-i-refactor-someone-elses-code -

Migration of MSO links to MSE links
Source Link

It's generally accepted that you shouldn't do any more than

  • formatting into a markdown code block

  • if you're feeling generous, removing cruft like rogue tabs and making sure the code all lines up nicely (whilst honouring the OP's brace style)

  • where the language allows statements over multiple lines, adding a carriage return (and where required a line continuation character) here and there to reduce horizontal scroll.

  • removing excessive carriage returns between lines of code

Changing code style would be off-limits, as would doing things like turning (using C# as an example):

List<Thing> things = repo.GetThings()

into

var things = repo.GetThings()

Because now you're no longer working with the same code the OP is trying to debug.

See also:

http://meta.stackoverflowstackexchange.com/questions/101583/when-is-it-appropriate-to-edit-someone-elses-code

http://meta.stackoverflowstackexchange.com/questions/88627/how-far-can-i-refactor-someone-elses-code -

It's generally accepted that you shouldn't do any more than

  • formatting into a markdown code block

  • if you're feeling generous, removing cruft like rogue tabs and making sure the code all lines up nicely (whilst honouring the OP's brace style)

  • where the language allows statements over multiple lines, adding a carriage return (and where required a line continuation character) here and there to reduce horizontal scroll.

  • removing excessive carriage returns between lines of code

Changing code style would be off-limits, as would doing things like turning (using C# as an example):

List<Thing> things = repo.GetThings()

into

var things = repo.GetThings()

Because now you're no longer working with the same code the OP is trying to debug.

See also:

http://meta.stackoverflow.com/questions/101583/when-is-it-appropriate-to-edit-someone-elses-code

http://meta.stackoverflow.com/questions/88627/how-far-can-i-refactor-someone-elses-code -

It's generally accepted that you shouldn't do any more than

  • formatting into a markdown code block

  • if you're feeling generous, removing cruft like rogue tabs and making sure the code all lines up nicely (whilst honouring the OP's brace style)

  • where the language allows statements over multiple lines, adding a carriage return (and where required a line continuation character) here and there to reduce horizontal scroll.

  • removing excessive carriage returns between lines of code

Changing code style would be off-limits, as would doing things like turning (using C# as an example):

List<Thing> things = repo.GetThings()

into

var things = repo.GetThings()

Because now you're no longer working with the same code the OP is trying to debug.

See also:

http://meta.stackexchange.com/questions/101583/when-is-it-appropriate-to-edit-someone-elses-code

http://meta.stackexchange.com/questions/88627/how-far-can-i-refactor-someone-elses-code -

Source Link
Kev Mod
  • 19.3k
  • 11
  • 49
  • 101

It's generally accepted that you shouldn't do any more than

  • formatting into a markdown code block

  • if you're feeling generous, removing cruft like rogue tabs and making sure the code all lines up nicely (whilst honouring the OP's brace style)

  • where the language allows statements over multiple lines, adding a carriage return (and where required a line continuation character) here and there to reduce horizontal scroll.

  • removing excessive carriage returns between lines of code

Changing code style would be off-limits, as would doing things like turning (using C# as an example):

List<Thing> things = repo.GetThings()

into

var things = repo.GetThings()

Because now you're no longer working with the same code the OP is trying to debug.

See also:

http://meta.stackoverflow.com/questions/101583/when-is-it-appropriate-to-edit-someone-elses-code

http://meta.stackoverflow.com/questions/88627/how-far-can-i-refactor-someone-elses-code -