diff --git a/add_trailing_comma.py b/add_trailing_comma.py
index 7052979..ea579a6 100644
--- a/add_trailing_comma.py
+++ b/add_trailing_comma.py
@@ -517,13 +517,17 @@ def fix_file(filename, args):
         with io.open(filename, 'w', newline='', encoding='UTF-8') as f:
             f.write(contents_text)
 
-    return contents_text != contents_text_orig
+    if args.exit_zero_even_if_changed:
+        return 0
+    else:
+        return contents_text != contents_text_orig
 
 
 def main(argv=None):
     # type: (Optional[Sequence[str]]) -> int
     parser = argparse.ArgumentParser()
     parser.add_argument('filenames', nargs='*')
+    parser.add_argument('--exit-zero-even-if-changed', action='store_true')
     parser.add_argument('--py35-plus', action='store_true')
     parser.add_argument('--py36-plus', action='store_true')
     args = parser.parse_args(argv)

Even if successful, add-trailing-comma reading from stdin returns 1 as a status code in the shell. Is this the intended behavior?
Create a `test.py`:

```python
# -*- coding: utf-8 -*-

test = [
    1,
    2
]
```

`add-trailing-comma - < test.py` outputs correctly:

```python
# -*- coding: utf-8 -*-

test = [
    1,
    2,
]
```

But the return statuscode is `1`:

```bash
❯ echo $?                                                                                                                                                   [11:30:11]
1
```

This is a different behavior from other formatters, like black:

``` bash
black - < test.py                                                                                                                                         [11:30:46]
# -*- coding: utf-8 -*-

test = [1, 2]
reformatted -
All done! ✨ 🍰 ✨
1 file reformatted.
 ❯ echo $?                                                                                                                                                   [11:30:54]
0
```

Some formatters in editors (like [vim-autoformat](https://github.com/Chiel92/vim-autoformat)) [expect a `0` statuscode](https://github.com/Chiel92/vim-autoformat/blob/c203080645936e73b2124040bc963386eeb44f5e/plugin/autoformat.vim#L216) to make sure the formatter call was ok, and this is inconsistent with [exit codes with special meanings](https://www.tldp.org/LDP/abs/html/exitcodes.html).

Since the `stdin` feature comes from a month old PR (https://github.com/asottile/add-trailing-comma/pull/75), I think it's nice to consider changing this to be standard like other tools.
diff --git a/tests/add_trailing_comma_test.py b/tests/add_trailing_comma_test.py
index 55e9bf6..e0c891a 100644
--- a/tests/add_trailing_comma_test.py
+++ b/tests/add_trailing_comma_test.py
@@ -958,3 +958,11 @@ def test_main_stdin_with_changes(capsys):
         assert main(('-',)) == 1
     out, err = capsys.readouterr()
     assert out == 'x(\n    1,\n)\n'
+
+
+def test_main_exit_zero_even_if_changed(tmpdir):
+    f = tmpdir.join('t.py')
+    f.write('x(\n    1\n)')
+    assert not main((str(f), '--exit-zero-even-if-changed'))
+    assert f.read() == 'x(\n    1,\n)'
+    assert not main((str(f), '--exit-zero-even-if-changed'))

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
3.9
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
-e git+https://github.com/asottile/add-trailing-comma.git@64047876fad76230949d4fe8903a29323aaf1911#egg=add_trailing_comma
cfgv==3.4.0
coverage==7.8.0
distlib==0.3.9
exceptiongroup==1.2.2
filelock==3.18.0
flake8==7.2.0
identify==2.6.9
iniconfig==2.1.0
mccabe==0.7.0
mock==5.2.0
nodeenv==1.9.1
packaging==24.2
platformdirs==4.3.7
pluggy==1.5.0
pre_commit==4.2.0
pycodestyle==2.13.0
pyflakes==3.3.2
pytest==8.3.5
PyYAML==6.0.2
tokenize_rt==6.1.0
tomli==2.2.1
virtualenv==20.29.3

name: add-trailing-comma
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - cfgv==3.4.0
      - coverage==7.8.0
      - distlib==0.3.9
      - exceptiongroup==1.2.2
      - filelock==3.18.0
      - flake8==7.2.0
      - identify==2.6.9
      - iniconfig==2.1.0
      - mccabe==0.7.0
      - mock==5.2.0
      - nodeenv==1.9.1
      - packaging==24.2
      - platformdirs==4.3.7
      - pluggy==1.5.0
      - pre-commit==4.2.0
      - pycodestyle==2.13.0
      - pyflakes==3.3.2
      - pytest==8.3.5
      - pyyaml==6.0.2
      - tokenize-rt==6.1.0
      - tomli==2.2.1
      - virtualenv==20.29.3
prefix: /opt/conda/envs/add-trailing-comma

tests/add_trailing_comma_test.py::test_main_exit_zero_even_if_changed
tests/add_trailing_comma_test.py::test_fix_calls_noops[x tests/add_trailing_comma_test.py::test_fix_calls_noops[x(1)] tests/add_trailing_comma_test.py::test_fix_calls_noops[tuple(\n tests/add_trailing_comma_test.py::test_fix_calls_noops[x(\n tests/add_trailing_comma_test.py::test_fix_calls_noops[x((\n tests/add_trailing_comma_test.py::test_fix_calls_noops[(\n tests/add_trailing_comma_test.py::test_py35_plus_rewrite tests/add_trailing_comma_test.py::test_fixes_calls[x(\n tests/add_trailing_comma_test.py::test_fixes_calls[foo()(\n tests/add_trailing_comma_test.py::test_fixes_calls[x({}).y(\n tests/add_trailing_comma_test.py::test_noop_literals[(1, tests/add_trailing_comma_test.py::test_noop_literals[[1, tests/add_trailing_comma_test.py::test_noop_literals[{1, tests/add_trailing_comma_test.py::test_noop_literals[{1: tests/add_trailing_comma_test.py::test_noop_literals[if tests/add_trailing_comma_test.py::test_fixes_literals[x tests/add_trailing_comma_test.py::test_fixes_literals[(\n tests/add_trailing_comma_test.py::test_fixes_py35_plus_literals[x tests/add_trailing_comma_test.py::test_noop_tuple_literal_without_braces tests/add_trailing_comma_test.py::test_noop_function_defs[def tests/add_trailing_comma_test.py::test_fixes_defs[def tests/add_trailing_comma_test.py::test_fixes_defs_py36_plus[def tests/add_trailing_comma_test.py::test_noop_unhugs[f(x, tests/add_trailing_comma_test.py::test_noop_unhugs[f(\n tests/add_trailing_comma_test.py::test_noop_unhugs[f((\n tests/add_trailing_comma_test.py::test_noop_unhugs[f([\n tests/add_trailing_comma_test.py::test_noop_unhugs[textwrap.dedent("""\n tests/add_trailing_comma_test.py::test_fix_unhugs[f(\n tests/add_trailing_comma_test.py::test_fix_unhugs[f(a,\n tests/add_trailing_comma_test.py::test_fix_unhugs[def tests/add_trailing_comma_test.py::test_fix_unhugs[with tests/add_trailing_comma_test.py::test_fix_unhugs[if tests/add_trailing_comma_test.py::test_fix_unhugs[{'foo': tests/add_trailing_comma_test.py::test_fix_unhugs[f(g(\n tests/add_trailing_comma_test.py::test_fix_unhugs[{"foo": tests/add_trailing_comma_test.py::test_fix_unhugs[x tests/add_trailing_comma_test.py::test_fix_unhugs[x("foo", tests/add_trailing_comma_test.py::test_fix_unhugs[x("foo"\n tests/add_trailing_comma_test.py::test_fix_unhugs[[a()\n tests/add_trailing_comma_test.py::test_fix_unhugs[#42: tests/add_trailing_comma_test.py::test_fix_unhugs_py3_only[def tests/add_trailing_comma_test.py::test_noop_trailing_brace[[]] tests/add_trailing_comma_test.py::test_noop_trailing_brace[x tests/add_trailing_comma_test.py::test_noop_trailing_brace[y tests/add_trailing_comma_test.py::test_noop_trailing_brace[foo.\\\n tests/add_trailing_comma_test.py::test_noop_trailing_brace[if tests/add_trailing_comma_test.py::test_fix_trailing_brace[x tests/add_trailing_comma_test.py::test_fix_from_import_noop[from tests/add_trailing_comma_test.py::test_fix_from_import[from tests/add_trailing_comma_test.py::test_fix_from_import[if tests/add_trailing_comma_test.py::test_fix_classes_noop[class tests/add_trailing_comma_test.py::test_fix_classes[class tests/add_trailing_comma_test.py::test_remove_extra_comma[(1,)-(1,)] tests/add_trailing_comma_test.py::test_remove_extra_comma[(1, tests/add_trailing_comma_test.py::test_remove_extra_comma[[1, tests/add_trailing_comma_test.py::test_remove_extra_comma[{1, tests/add_trailing_comma_test.py::test_remove_extra_comma[{1: tests/add_trailing_comma_test.py::test_remove_extra_comma[f(1, tests/add_trailing_comma_test.py::test_fix_classes_py3_only_syntax[bases tests/add_trailing_comma_test.py::test_fix_classes_py3_only_syntax[kws tests/add_trailing_comma_test.py::test_fix_classes_py3_only_syntax[class tests/add_trailing_comma_test.py::test_main_trivial tests/add_trailing_comma_test.py::test_main_noop tests/add_trailing_comma_test.py::test_main_changes_a_file tests/add_trailing_comma_test.py::test_main_preserves_line_endings tests/add_trailing_comma_test.py::test_main_syntax_error tests/add_trailing_comma_test.py::test_main_non_utf8_bytes tests/add_trailing_comma_test.py::test_main_py35_plus_argument_star_args tests/add_trailing_comma_test.py::test_main_py35_plus_argument_star_star_kwargs tests/add_trailing_comma_test.py::test_main_py36_plus_implies_py35_plus tests/add_trailing_comma_test.py::test_main_py36_plus_function_trailing_commas tests/add_trailing_comma_test.py::test_main_stdin_no_changes tests/add_trailing_comma_test.py::test_main_stdin_with_changes
add_trailing_comma.py
add_trailing_comma.py