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

YAML files syntactic changes #723

Closed
tomasdedic opened this issue May 30, 2024 · 1 comment
Closed

YAML files syntactic changes #723

tomasdedic opened this issue May 30, 2024 · 1 comment

Comments

@tomasdedic
Copy link

When I difft two yaml files where only difference is position of element I am still getting diff change.
I would expect it the be syntactically the same files.

image

difft --version
Difftastic 0.57.0 (built with rustc 1.77.1)
difft cluster-monitoring-config.yaml cluster-monitoring-config2.yaml --check-only
cluster-monitoring-config2.yaml --- YAML
Has syntactic changes.
#cluster-monitoring-config.yaml
apiVersion: v1
kind: ConfigMap
data:
  prometheusOperator:
    nodeSelector:
      node-role.kubernetes.io/worker: ''
  enableUserWorkload: true
  prometheusK8s:
    retention: 3d
    additionalAlertmanagerConfigs:
    - apiVersion: v2
      pathPrefix: /
      scheme: http
      timeout: "30s"
      tlsConfig:
        insecureSkipVerify: true
#cluster-monitoring-config2.yaml
apiVersion: v1
kind: ConfigMap
data:
  enableUserWorkload: true
  prometheusOperator:
    nodeSelector:
      node-role.kubernetes.io/worker: ''
  prometheusK8s:
    retention: 3d
    additionalAlertmanagerConfigs:
    - apiVersion: v2
      pathPrefix: /
      scheme: http
      timeout: "30s"
      tlsConfig:
        insecureSkipVerify: true
@Wilfred Wilfred closed this as completed in f1bd870 Jul 9, 2024
@Wilfred
Copy link
Owner

Wilfred commented Jul 9, 2024

Yeah, I'm afraid difftastic considers order to be important for all syntax. This is a relatively common question, so I've added an FAQ item: https://github.com/wilfred/difftastic?tab=readme-ov-file#can-difftastic-ignore-reordering

nimrodkor pushed a commit to baz-scm/difftastic that referenced this issue Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants